Package jebl.util
Class BasicProgressListener
java.lang.Object
jebl.util.ProgressListener
jebl.util.BasicProgressListener
- All Implemented Interfaces:
Cancelable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class jebl.util.ProgressListener
ProgressListener.Wrapper
-
Field Summary
Fields inherited from class jebl.util.ProgressListener
EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Sets this progress listener as cancel, so thatisCanceled()
will return true.double
boolean
This method must be implemented by all subclasses.boolean
Methods inherited from class jebl.util.ProgressListener
addFeedbackAction, addFeedbackAction, removeFeedbackAction, setImage, setIndeterminateProgress, setMessage, setProgress, setProgress, setProgress, setTitle
-
Constructor Details
-
BasicProgressListener
public BasicProgressListener()
-
-
Method Details
-
isCanceled
public boolean isCanceled()Description copied from class:ProgressListener
This method must be implemented by all subclasses. It is called fromProgressListener.setProgress(double)
,ProgressListener.setIndeterminateProgress()
andProgressListener.setMessage(java.lang.String)
to determine the return value of these methods.- Specified by:
isCanceled
in interfaceCancelable
- Specified by:
isCanceled
in classProgressListener
- Returns:
- true if the user has requested that this operation be canceled.
-
cancel
public void cancel()Sets this progress listener as cancel, so thatisCanceled()
will return true. -
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, andProgressListener.setProgress(double)
has not been called since
-