public abstract class ProgressTracker extends Object
Constructor and Description |
---|
ProgressTracker() |
Modifier and Type | Method and Description |
---|---|
static void |
checkAndThrow(ProgressTracker tracker)
Checks the tracker and throws UserCancelException if tracker is not null and progress returns false
|
abstract boolean |
progress(int step,
int totalExpectedSteps)
Periodically called by a lengthy operation to check if the caller requested to cancel.
|
public abstract boolean progress(int step, int totalExpectedSteps)
step
- The current step of the operation.totalExpectedSteps
- is the number of steps the operation is expects to complete its task.public static void checkAndThrow(ProgressTracker tracker)
tracker
- can be null, then the method does nothing.Copyright © 2018. All rights reserved.