public interface ProgressGauge
Class implement this interface can track progress
Modifier and Type | Interface and Description |
---|---|
static interface |
ProgressGauge.Listener |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ProgressGauge.Listener listener)
Add an listener to this gauge that monitors the progress update
|
int |
currentSteps()
Report the current progress steps
|
boolean |
isDone()
Check if the progress has been finished
|
void |
markAsDone()
Mark the progress as done
|
int |
maxHint()
Returns the max hint
|
void |
setId(String id)
Set ID to the gauge
|
void |
step()
Advances the progress by one step
|
void |
stepBy(int steps)
Advances the progress by specified steps
|
void |
stepTo(int steps)
Log progress
|
void |
updateMaxHint(int maxHint)
Update max hint.
|
void setId(String id)
Set ID to the gauge
id
- the gauge IDvoid updateMaxHint(int maxHint)
Update max hint. If the number is negative, then it indicate the progress is indefinite
maxHint
- the max steps hintvoid step()
Advances the progress by one step
void stepBy(int steps)
Advances the progress by specified steps
steps
- the step sizevoid stepTo(int steps)
Log progress
steps
- the new progress valueint currentSteps()
Report the current progress steps
int maxHint()
Returns the max hint
boolean isDone()
Check if the progress has been finished
void markAsDone()
Mark the progress as done
void addListener(ProgressGauge.Listener listener)
Add an listener to this gauge that monitors the progress update
listener
- the listenerCopyright © 2014–2018 ActFramework. All rights reserved.