|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.das2.util.monitor.SubTaskMonitor
public class SubTaskMonitor
creates a ProgressMonitor that maps its progress to a parent's progress. For example, if a process takes a progress monitor, but is implemented in two steps that each take a progress monitor, then two subtask monitors can be created to monitor each step, and the client who passed in the monitor will see the whole deal as one process.
| Field Summary |
|---|
| Fields inherited from interface org.das2.util.monitor.ProgressMonitor |
|---|
NULL, SIZE_INDETERMINATE |
| Method Summary | |
|---|---|
void |
cancel()
Notifies the ProgressMonitor that the task
being monitored should be canceled. |
static SubTaskMonitor |
create(ProgressMonitor parent,
long min,
long max)
|
void |
finished()
Notifies the ProgressMonitor that the task
being monitored has finished. |
java.lang.String |
getLabel()
Return the label string displayed. |
long |
getTaskProgress()
Returns the current progress of the monitored task. |
long |
getTaskSize()
|
boolean |
isCancelled()
Returns true if the operation being tracked
should be cancelled. |
boolean |
isFinished()
true if the process has indicated that it is finished |
boolean |
isStarted()
true if the process has indicated that it has started. |
void |
setAdditionalInfo(java.lang.String s)
Deprecated. |
void |
setLabel(java.lang.String label)
Set a consise string that describes the task being performed. |
void |
setProgressMessage(java.lang.String message)
Provides additional feedback as to what's going on in the process. |
void |
setTaskProgress(long position)
Notifies the ProgressMonitor of a change in the progress of the task. |
void |
setTaskSize(long taskSize)
Sets the maximum value for the task progress of this ProgressMonitor. |
void |
started()
Notifies the ProgressMonitor that the task
being monitored has started. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static SubTaskMonitor create(ProgressMonitor parent,
long min,
long max)
public void cancel()
ProgressMonitorProgressMonitor that the task
being monitored should be canceled. After this method is
called, implementations should return true on
any subsequent calls to ProgressMonitor.isCancelled() and should
throw an IllegalStateException on any subsequent calls to
ProgressMonitor.setTaskProgress(long).
cancel in interface ProgressMonitorpublic void finished()
ProgressMonitorProgressMonitor that the task
being monitored has finished.
finished in interface ProgressMonitorpublic boolean isFinished()
ProgressMonitor
isFinished in interface ProgressMonitorpublic long getTaskProgress()
ProgressMonitor
getTaskProgress in interface ProgressMonitorpublic boolean isCancelled()
ProgressMonitortrue if the operation being tracked
should be cancelled.
isCancelled in interface ProgressMonitortrue if the operation being tracked
should be cancelled.@Deprecated public void setAdditionalInfo(java.lang.String s)
ProgressMonitor
setAdditionalInfo in interface ProgressMonitor
public void setTaskProgress(long position)
throws java.lang.IllegalArgumentException
ProgressMonitor
setTaskProgress in interface ProgressMonitorposition - the current task position
java.lang.IllegalArgumentException - if ProgressMonitor.isCancelled() returns true or,
possibly if started() has not been called or
finished() has been called.public void setTaskSize(long taskSize)
ProgressMonitorProgressMonitor.
setTaskSize in interface ProgressMonitortaskSize - maximum value for the task progress. A taskSize of -1 indicates the taskSize is indeterminate.public long getTaskSize()
getTaskSize in interface ProgressMonitorpublic void started()
ProgressMonitorProgressMonitor that the task
being monitored has started. If the ProgressMonitor
is in a cancelled state when this method is called, that
ProgressMonitor should be 'uncancelled'.
started in interface ProgressMonitorpublic boolean isStarted()
ProgressMonitor
isStarted in interface ProgressMonitorpublic void setLabel(java.lang.String label)
ProgressMonitor
setLabel in interface ProgressMonitorpublic java.lang.String getLabel()
ProgressMonitor
getLabel in interface ProgressMonitorpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setProgressMessage(java.lang.String message)
ProgressMonitor
setProgressMessage in interface ProgressMonitormessage - the message describing the state of progress.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||