Package com.esri.core.geometry
Class ProgressTracker
java.lang.Object
com.esri.core.geometry.ProgressTracker
A callback to provide progress and cancel tracking mechanism for lengthy operation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkAndThrow
(ProgressTracker tracker) Checks the tracker and throws UserCancelException if tracker is not null and progress returns falseabstract boolean
progress
(int step, int totalExpectedSteps) Periodically called by a lengthy operation to check if the caller requested to cancel.
-
Constructor Details
-
ProgressTracker
public ProgressTracker()
-
-
Method Details
-
progress
public abstract boolean progress(int step, int totalExpectedSteps) Periodically called by a lengthy operation to check if the caller requested to cancel.- Parameters:
step
- The current step of the operation.totalExpectedSteps
- is the number of steps the operation is expects to complete its task.- Returns:
- true, if the operation can continue. Returns False, when the operation has to terminate due to a user cancelation.
-
checkAndThrow
Checks the tracker and throws UserCancelException if tracker is not null and progress returns false- Parameters:
tracker
- can be null, then the method does nothing.
-