|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProgressListener
This interface must be implemented by classes that want to be notified about progress of an image operation.
Method Summary | |
---|---|
void |
setProgress(float progress)
Set the progress level to a new value, which must be between 0.0f and 1.0f (including both of these values). |
void |
setProgress(int zeroBasedIndex,
int totalItems)
Sets a new progress level. |
Method Detail |
---|
void setProgress(float progress)
progress
- the degree of progress as a value between 0.0f and 1.0f
IllegalArgumentException
- if the float argument is not in the mentioned intervalvoid setProgress(int zeroBasedIndex, int totalItems)
Example: if there are three steps and the first one is done, the parameters must be 0 and 3, which will indicated 33% completion. Parameters 1 and 3 mean 66%, 2 and 3 100%. If you use 3 and 3, an IllegalArgumentException will be thrown.
Computes (float)(zeroBasedIndex + 1) / (float)totalItems
and calls
setProgress(float)
with that value.
zeroBasedIndex
- the index of the step that was just completedtotalItems
- the number of steps in this operation
IllegalArgumentException
- if the parameters don't match the above criteria
|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |