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 boolean
internal
private AbstractProgressMonitor
parent
-
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 void
doBeginTask()
protected void
doFinishTask()
protected void
doSetCustomText(java.lang.String title)
protected void
doSetIntermediate(boolean value)
protected void
doSetTitle(java.lang.String title)
AbstractProgressMonitor
getParent()
Gets the parent taskProgressTaskId
getProgressTaskId()
Returns the task ID of the progress dialog Should be used only by PleaseWaitRunnablejava.awt.Component
getWindowParent()
Return the parent windows of progress dialogboolean
isInternal()
See if this is an internal taskvoid
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
-
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:AbstractProgressMonitor
Update progress message- Specified by:
updateProgress
in classAbstractProgressMonitor
- Parameters:
value
- The percentage of completion (this and child progress)
-
doBeginTask
protected void doBeginTask()
- Specified by:
doBeginTask
in classAbstractProgressMonitor
-
doSetCustomText
protected void doSetCustomText(java.lang.String title)
- Specified by:
doSetCustomText
in classAbstractProgressMonitor
-
doSetTitle
protected void doSetTitle(java.lang.String title)
- Specified by:
doSetTitle
in classAbstractProgressMonitor
-
doSetIntermediate
protected void doSetIntermediate(boolean value)
- Specified by:
doSetIntermediate
in classAbstractProgressMonitor
-
doFinishTask
protected void doFinishTask()
- Specified by:
doFinishTask
in classAbstractProgressMonitor
-
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
-
-