Class CLIProgressMonitor
- java.lang.Object
-
- org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
-
- org.openstreetmap.josm.gui.progress.CLIProgressMonitor
-
- All Implemented Interfaces:
ProgressMonitor
public class CLIProgressMonitor extends AbstractProgressMonitor
CLI implementation of aProgressMonitor
- Since:
- 18365
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
AbstractProgressMonitor.State
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.progress.ProgressMonitor
ProgressMonitor.CancelListener
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
customText
The custom text (prepended with '/')private Stopwatch
lastUpdateTime
The last time we updated the progress informationprivate Stopwatch
startTime
The start time of the monitorprivate ProgressTaskId
taskId
The current task idprivate java.lang.String
title
The current task title-
Fields inherited from class org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
state
-
Fields inherited from interface org.openstreetmap.josm.gui.progress.ProgressMonitor
ALL_TICKS, DEFAULT_TICKS
-
-
Constructor Summary
Constructors Constructor Description CLIProgressMonitor()
Create a newCLIProgressMonitor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doBeginTask()
protected void
doFinishTask()
protected void
doSetCustomText(java.lang.String customText)
protected void
doSetIntermediate(boolean value)
protected void
doSetTitle(java.lang.String title)
ProgressTaskId
getProgressTaskId()
Returns the task ID of the progress dialog Should be used only by PleaseWaitRunnablejava.awt.Component
getWindowParent()
Return the parent windows of progress dialogvoid
setProgressTaskId(ProgressTaskId taskId)
Set the task ID of the progress dialog Should be used only by PleaseWaitRunnable.protected void
updateProgress(double value)
Update progress message-
Methods inherited from class org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
addCancelListener, appendLogMessage, beginTask, beginTask, cancel, checkState, childFinished, childSetCustomText, childSetIntermediate, childSetProgress, childSetTitle, createSubTaskMonitor, finishTask, getTicks, getTicksCount, indeterminateSubTask, invalidate, isCanceled, removeCancelListener, setCustomText, setExtraText, setTicks, setTicksCount, subTask, worked
-
-
-
-
Field Detail
-
taskId
private ProgressTaskId taskId
The current task id
-
title
private java.lang.String title
The current task title
-
customText
private java.lang.String customText
The custom text (prepended with '/')
-
lastUpdateTime
private Stopwatch lastUpdateTime
The last time we updated the progress information
-
-
Constructor Detail
-
CLIProgressMonitor
public CLIProgressMonitor()
Create a newCLIProgressMonitor
-
-
Method Detail
-
doBeginTask
protected void doBeginTask()
- Specified by:
doBeginTask
in classAbstractProgressMonitor
-
doFinishTask
protected void doFinishTask()
- Specified by:
doFinishTask
in classAbstractProgressMonitor
-
doSetIntermediate
protected void doSetIntermediate(boolean value)
- Specified by:
doSetIntermediate
in classAbstractProgressMonitor
-
doSetTitle
protected void doSetTitle(java.lang.String title)
- Specified by:
doSetTitle
in classAbstractProgressMonitor
-
doSetCustomText
protected void doSetCustomText(java.lang.String customText)
- Specified by:
doSetCustomText
in classAbstractProgressMonitor
-
updateProgress
protected void updateProgress(double value)
Description copied from class:AbstractProgressMonitor
Update progress message- Specified by:
updateProgress
in classAbstractProgressMonitor
- Parameters:
value
- The percentage of completion (this and child progress)
-
setProgressTaskId
public void setProgressTaskId(ProgressTaskId taskId)
Description copied from interface:ProgressMonitor
Set the task ID of the progress dialog Should be used only by PleaseWaitRunnable. If taskId<> null
then "In background" button will be shown- Parameters:
taskId
- the task ID
-
getProgressTaskId
public ProgressTaskId getProgressTaskId()
Description copied from interface:ProgressMonitor
Returns the task ID of the progress dialog Should be used only by PleaseWaitRunnable- Returns:
- the task ID
-
getWindowParent
public java.awt.Component getWindowParent()
Description copied from interface:ProgressMonitor
Return the parent windows of progress dialog- Returns:
- component suitable as parent for dialogs that wants to be shown in front of progress dialog
-
-