|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sodius.mdw.core.util.progress.ProgressMonitorWrapper
com.sodius.mdw.core.util.progress.SubProgressMonitor
public class SubProgressMonitor
A progress monitor that uses a given amount of work ticks from a parent monitor.
This class may be instantiated or subclassed by clients.
| Field Summary | |
|---|---|
static int |
PREPEND_MAIN_LABEL_TO_SUBTASK
Style constant indicating that the main task label should be prepended to the subtask label. |
static int |
SUPPRESS_SUBTASK_LABEL
Style constant indicating that calls to subTask
should not have any effect. |
| Fields inherited from interface com.sodius.mdw.core.util.progress.ProgressMonitor |
|---|
UNKNOWN |
| Constructor Summary | |
|---|---|
SubProgressMonitor(ProgressMonitor monitor,
int ticks)
Creates a new sub-progress monitor for the given monitor. |
|
SubProgressMonitor(ProgressMonitor monitor,
int ticks,
int style)
Creates a new sub-progress monitor for the given monitor. |
|
| Method Summary | |
|---|---|
void |
beginTask(String name,
int totalWork)
Notifies that the main task is beginning. |
void |
done()
Notifies that the work is done; that is, either the main task is completed or the user canceled it. |
void |
internalWorked(double work)
Internal method to handle scaling correctly. |
void |
subTask(String name)
Notifies that a subtask of the main task is beginning. |
void |
worked(int work)
Notifies that a given number of work unit of the main task has been completed. |
| Methods inherited from class com.sodius.mdw.core.util.progress.ProgressMonitorWrapper |
|---|
getWrappedProgressMonitor, isCanceled, setCanceled, setTaskName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SUPPRESS_SUBTASK_LABEL
subTask
should not have any effect.
SubProgressMonitor(ProgressMonitor, int, int),
Constant Field Valuespublic static final int PREPEND_MAIN_LABEL_TO_SUBTASK
SubProgressMonitor(ProgressMonitor, int, int),
Constant Field Values| Constructor Detail |
|---|
public SubProgressMonitor(ProgressMonitor monitor,
int ticks)
monitor - the parent progress monitorticks - the number of work ticks allocated from the parent monitor
public SubProgressMonitor(ProgressMonitor monitor,
int ticks,
int style)
monitor - the parent progress monitorticks - the number of work ticks allocated from the parent monitorstyle - one of
SUPPRESS_SUBTASK_LABEL PREPEND_MAIN_LABEL_TO_SUBTASK SUPPRESS_SUBTASK_LABEL,
PREPEND_MAIN_LABEL_TO_SUBTASK| Method Detail |
|---|
public void beginTask(String name,
int totalWork)
ProgressMonitor
beginTask in interface ProgressMonitorbeginTask in class ProgressMonitorWrappername - the name (or description) of the main tasktotalWork - the total number of work units into which
the main task is been subdivided. If the value is UNKNOWN
the implementation is free to indicate progress in a way which
doesn't require the total number of work units in advance.public void done()
ProgressMonitor
done in interface ProgressMonitordone in class ProgressMonitorWrapperpublic void internalWorked(double work)
ProgressMonitor
internalWorked in interface ProgressMonitorinternalWorked in class ProgressMonitorWrapperwork - the amount of work donepublic void subTask(String name)
ProgressMonitor
subTask in interface ProgressMonitorsubTask in class ProgressMonitorWrappername - the name (or description) of the subtaskpublic void worked(int work)
ProgressMonitor
worked in interface ProgressMonitorworked in class ProgressMonitorWrapperwork - the number of work units just completed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||