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.progress
package}
-
-
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 int
currentProgressValue
private ProgressRenderer
delegate
private static int
PROGRESS_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 void
doBeginTask()
void
doFinishTask()
protected void
doSetCustomText(java.lang.String title)
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 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:
doBeginTask
in classAbstractProgressMonitor
-
doFinishTask
public void doFinishTask()
- Specified by:
doFinishTask
in classAbstractProgressMonitor
-
updateProgress
protected void updateProgress(double progressValue)
Description copied from class:AbstractProgressMonitor
Update progress message- Specified by:
updateProgress
in classAbstractProgressMonitor
- Parameters:
progressValue
- The percentage of completion (this and child progress)
-
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
-
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
-
-