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.StringcustomTextThe custom text (prepended with '/')private StopwatchlastUpdateTimeThe last time we updated the progress informationprivate StopwatchstartTimeThe start time of the monitorprivate ProgressTaskIdtaskIdThe current task idprivate java.lang.StringtitleThe 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 voiddoBeginTask()protected voiddoFinishTask()protected voiddoSetCustomText(java.lang.String customText)protected voiddoSetIntermediate(boolean value)protected voiddoSetTitle(java.lang.String title)ProgressTaskIdgetProgressTaskId()Returns the task ID of the progress dialog Should be used only by PleaseWaitRunnablejava.awt.ComponentgetWindowParent()Return the parent windows of progress dialogvoidsetProgressTaskId(ProgressTaskId taskId)Set the task ID of the progress dialog Should be used only by PleaseWaitRunnable.protected voidupdateProgress(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:
doBeginTaskin classAbstractProgressMonitor
-
doFinishTask
protected void doFinishTask()
- Specified by:
doFinishTaskin classAbstractProgressMonitor
-
doSetIntermediate
protected void doSetIntermediate(boolean value)
- Specified by:
doSetIntermediatein classAbstractProgressMonitor
-
doSetTitle
protected void doSetTitle(java.lang.String title)
- Specified by:
doSetTitlein classAbstractProgressMonitor
-
doSetCustomText
protected void doSetCustomText(java.lang.String customText)
- Specified by:
doSetCustomTextin classAbstractProgressMonitor
-
updateProgress
protected void updateProgress(double value)
Description copied from class:AbstractProgressMonitorUpdate progress message- Specified by:
updateProgressin classAbstractProgressMonitor- Parameters:
value- The percentage of completion (this and child progress)
-
setProgressTaskId
public void setProgressTaskId(ProgressTaskId taskId)
Description copied from interface:ProgressMonitorSet the task ID of the progress dialog Should be used only by PleaseWaitRunnable. If taskId<> nullthen "In background" button will be shown- Parameters:
taskId- the task ID
-
getProgressTaskId
public ProgressTaskId getProgressTaskId()
Description copied from interface:ProgressMonitorReturns 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:ProgressMonitorReturn the parent windows of progress dialog- Returns:
- component suitable as parent for dialogs that wants to be shown in front of progress dialog
-
-