public abstract class AbstractProgressMonitor extends Object implements ProgressMonitor
ProgressMonitor that implements very common functionality.| Constructor and Description |
|---|
AbstractProgressMonitor()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doMessageChanged()
Hook that is invoked after the message has changed.
|
protected void |
doProgressChanged()
Hook that is invoked after the progress has changed.
|
String |
getMessage()
Get the current progress message.
|
Integer |
getProgress()
Retrieve the current progress percentage.
|
ProgressStatus |
getProgressStatus()
Get the current progress status.
|
int |
getRangeEnd()
Get the upper bound of the current range.
|
int |
getRangeStart()
Get the lower bound of the current range.
|
boolean |
isDone()
Flag to denote that the task has been done.
|
void |
setDone(boolean done) |
void |
setMessage(String msg)
Set the current progress message.
|
void |
setProgress(int percent)
Set the current progress percentage.
|
void |
setRange(int start,
int end)
Specify which range we are currently working on.
|
public AbstractProgressMonitor()
public final String getMessage()
ProgressMonitorgetMessage in interface ProgressMonitorpublic final Integer getProgress()
ProgressMonitorgetProgress in interface ProgressMonitorpublic ProgressStatus getProgressStatus()
ProgressMonitorgetProgressStatus in interface ProgressMonitorpublic final int getRangeEnd()
ProgressMonitorgetRangeEnd in interface ProgressMonitorpublic final int getRangeStart()
ProgressMonitorgetRangeStart in interface ProgressMonitorpublic final void setMessage(String msg)
ProgressMonitorsetMessage in interface ProgressMonitorprotected void doMessageChanged()
public final void setProgress(int percent)
ProgressMonitorsetProgress in interface ProgressMonitorprotected void doProgressChanged()
public final void setRange(int start,
int end)
ProgressMonitorProgressMonitor is shared among a larger set of tasks so each subtask can operate on
a specific range. For example if the current range if from 0 to 50 and the progress is set to
50 the overall progress that can be retrieved by getProgress is 25.setRange in interface ProgressMonitorstart - The lower bound of the range.end - The upper bound of the range.public boolean isDone()
ProgressMonitorisDone in interface ProgressMonitorpublic void setDone(boolean done)
setDone in interface ProgressMonitorCopyright © 2013 dontdrinkandroot. All Rights Reserved.