Class ChildProgress
- java.lang.Object
-
- org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
-
- org.openstreetmap.josm.gui.progress.ChildProgress
-
- All Implemented Interfaces:
ProgressMonitor
public class ChildProgress extends AbstractProgressMonitor
The progress of a sub task
-
-
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 booleaninternalprivate AbstractProgressMonitorparent-
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 ChildProgress(AbstractProgressMonitor parent, CancelHandler cancelHandler, boolean internal)Creates a newChildProgress
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoBeginTask()protected voiddoFinishTask()protected voiddoSetCustomText(java.lang.String title)protected voiddoSetIntermediate(boolean value)protected voiddoSetTitle(java.lang.String title)AbstractProgressMonitorgetParent()Gets the parent taskProgressTaskIdgetProgressTaskId()Returns the task ID of the progress dialog Should be used only by PleaseWaitRunnablejava.awt.ComponentgetWindowParent()Return the parent windows of progress dialogbooleanisInternal()See if this is an internal taskvoidsetProgressTaskId(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
-
parent
private final AbstractProgressMonitor parent
-
internal
private final boolean internal
-
-
Constructor Detail
-
ChildProgress
public ChildProgress(AbstractProgressMonitor parent, CancelHandler cancelHandler, boolean internal)
Creates a newChildProgress- Parameters:
parent- The parent task that creates this progresscancelHandler- The cancel handler to notify when this task is canceledinternal- this is an internal task that will not modify the text that is displayed to the user
-
-
Method Detail
-
getParent
public final AbstractProgressMonitor getParent()
Gets the parent task- Returns:
- The parent task
-
isInternal
public final boolean isInternal()
See if this is an internal task- Returns:
- True if this task should not modify the text that is displayed to the user
-
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)
-
doBeginTask
protected void doBeginTask()
- Specified by:
doBeginTaskin classAbstractProgressMonitor
-
doSetCustomText
protected void doSetCustomText(java.lang.String title)
- Specified by:
doSetCustomTextin classAbstractProgressMonitor
-
doSetTitle
protected void doSetTitle(java.lang.String title)
- Specified by:
doSetTitlein classAbstractProgressMonitor
-
doSetIntermediate
protected void doSetIntermediate(boolean value)
- Specified by:
doSetIntermediatein classAbstractProgressMonitor
-
doFinishTask
protected void doFinishTask()
- Specified by:
doFinishTaskin classAbstractProgressMonitor
-
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
-
-