Class SwingRenderingProgressMonitor
- java.lang.Object
-
- org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
-
- org.openstreetmap.josm.gui.progress.swing.SwingRenderingProgressMonitor
-
- All Implemented Interfaces:
ProgressMonitor
public class SwingRenderingProgressMonitor extends AbstractProgressMonitor
SwingRenderingProgressMonitor is progress monitor which delegates the rendering of progress information to aProgressRenderer. Methods of the progress renderer are always called on the Swing EDT.- Since:
- 12675 (moved from
gui.progresspackage}
-
-
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 intcurrentProgressValueprivate ProgressRendererdelegateprivate static intPROGRESS_BAR_MAX-
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 SwingRenderingProgressMonitor(ProgressRenderer delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoBeginTask()voiddoFinishTask()protected voiddoSetCustomText(java.lang.String title)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 progressValue)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
-
PROGRESS_BAR_MAX
private static final int PROGRESS_BAR_MAX
- See Also:
- Constant Field Values
-
currentProgressValue
private int currentProgressValue
-
delegate
private final ProgressRenderer delegate
-
-
Constructor Detail
-
SwingRenderingProgressMonitor
public SwingRenderingProgressMonitor(ProgressRenderer delegate)
- Parameters:
delegate- the delegate which renders the progress information. Must not be null.- Throws:
java.lang.IllegalArgumentException- if delegate is null
-
-
Method Detail
-
doBeginTask
public void doBeginTask()
- Specified by:
doBeginTaskin classAbstractProgressMonitor
-
doFinishTask
public void doFinishTask()
- Specified by:
doFinishTaskin classAbstractProgressMonitor
-
updateProgress
protected void updateProgress(double progressValue)
Description copied from class:AbstractProgressMonitorUpdate progress message- Specified by:
updateProgressin classAbstractProgressMonitor- Parameters:
progressValue- The percentage of completion (this and child progress)
-
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
-
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
-
-