jebl.util
Class BasicProgressListener
java.lang.Object
jebl.util.ProgressListener
jebl.util.BasicProgressListener
- All Implemented Interfaces:
- Cancelable
public class BasicProgressListener
- extends ProgressListener
A basic ProgressListener
implementation that allows the caller to set the canceled
status. Typically this class is used when you don't care about providing immediate feedback to
the user, but still need to be able to cancel an operation.
- Version:
- $Id$
- Author:
- Matt Kearse
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicProgressListener
public BasicProgressListener()
isCanceled
public boolean isCanceled()
- Description copied from class:
ProgressListener
- This method must be implemented by all subclasses. It is called from
ProgressListener.setProgress(double)
, ProgressListener.setIndeterminateProgress()
and ProgressListener.setMessage(java.lang.String)
to determine the return value of these methods.
- Specified by:
isCanceled
in interface Cancelable
- Specified by:
isCanceled
in class ProgressListener
- Returns:
- true if the user has requested that this operation be canceled.
cancel
public void cancel()
- Sets this progress listener as cancel, so that
isCanceled()
will return true.
getMessage
public java.lang.String getMessage()
- Returns:
- the most recent message set on this progress listener.
getFractionCompleted
public double getFractionCompleted()
- Returns:
- the current fraction complete.
isIndeterminate
public boolean isIndeterminate()
- Returns:
- true if
ProgressListener.setIndeterminateProgress()
has been called, and ProgressListener.setProgress(double)
has not been called since
http://code.google.com/p/jebl2/