|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.das2.util.monitor.NullProgressMonitor
public class NullProgressMonitor
This is a progress monitor to use when we don't care about the progress. This replaces ProgressMonitor.NULL, which has the problem that it was stateless and there assume that progress monitors have state. Further, this can act as a base class for other monitor types.
Field Summary |
---|
Fields inherited from interface org.das2.util.monitor.ProgressMonitor |
---|
NULL, SIZE_INDETERMINATE |
Constructor Summary | |
---|---|
NullProgressMonitor()
|
Method Summary | |
---|---|
void |
cancel()
Notifies the ProgressMonitor that the task
being monitored should be canceled. |
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 s)
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 |
Constructor Detail |
---|
public NullProgressMonitor()
Method Detail |
---|
public void setTaskSize(long taskSize)
ProgressMonitor
ProgressMonitor
.
setTaskSize
in interface ProgressMonitor
taskSize
- maximum value for the task progress. A taskSize of -1 indicates the taskSize is indeterminate.public long getTaskSize()
getTaskSize
in interface ProgressMonitor
public void setProgressMessage(java.lang.String message)
ProgressMonitor
setProgressMessage
in interface ProgressMonitor
message
- the message describing the state of progress.public void setTaskProgress(long position) throws java.lang.IllegalArgumentException
ProgressMonitor
setTaskProgress
in interface ProgressMonitor
position
- 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 long getTaskProgress()
ProgressMonitor
getTaskProgress
in interface ProgressMonitor
public void started()
ProgressMonitor
ProgressMonitor
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 ProgressMonitor
public boolean isStarted()
ProgressMonitor
isStarted
in interface ProgressMonitor
public void finished()
ProgressMonitor
ProgressMonitor
that the task
being monitored has finished.
finished
in interface ProgressMonitor
public boolean isFinished()
ProgressMonitor
isFinished
in interface ProgressMonitor
public void cancel()
ProgressMonitor
ProgressMonitor
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 ProgressMonitor
public boolean isCancelled()
ProgressMonitor
true
if the operation being tracked
should be cancelled.
isCancelled
in interface ProgressMonitor
true
if the operation being tracked
should be cancelled.@Deprecated public void setAdditionalInfo(java.lang.String s)
ProgressMonitor
setAdditionalInfo
in interface ProgressMonitor
public void setLabel(java.lang.String s)
ProgressMonitor
setLabel
in interface ProgressMonitor
public java.lang.String getLabel()
ProgressMonitor
getLabel
in interface ProgressMonitor
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |