Package ca.cgjennings.algo
Interface ProgressListener
-
- All Superinterfaces:
java.util.EventListener
- All Known Implementing Classes:
ProgressBarAdapter
,ProgressRangeAdapter
public interface ProgressListener extends java.util.EventListener
An interface implemented by classes that wish to listen to aMonitoredAlgorithm
to be notified when progress is made.- Since:
- 3.0
- Author:
- Chris Jennings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
progressUpdate(java.lang.Object source, float progress)
Called to indicate that an algorithm has made progress towards completion.
-
-
-
Method Detail
-
progressUpdate
boolean progressUpdate(java.lang.Object source, float progress)
Called to indicate that an algorithm has made progress towards completion. If the listener returnstrue
, it is a hint that the operation should be cancelled if possible.- Parameters:
source
- the source of the progress eventprogress
- a value between 0 (none) and 1 (algorithm complete)- Returns:
true
if the callee wishes to hint that the algorithm be cancelled
-
-