|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.util.Progress
public class Progress
A progress reporter utility. A single instance defines progress in user-specified numeric terms (for instance record 12 of 1012312), and gets translated to a percentage. Progress instances can obtain sub-progress parts that are Progress entries all by themselves and can define their work in their terms; they get mapped to the defined part of work in their parent(s).
Constructor Summary | |
---|---|
Progress(java.lang.String name)
Top-level progress indicator for a given task. |
Method Summary | |
---|---|
void |
cancel()
Request the action to be cancelled. |
void |
complete()
|
Progress |
createSubProgress(java.lang.String name,
double work)
Create a sub-progress indicator for the specified portion of work. |
java.lang.String |
getActionPath(int levels)
|
double |
getCompletedWork()
|
double |
getFraction()
|
java.lang.String |
getName()
|
Progress |
getParent()
|
int |
getPercentage()
|
Progress |
getRoot()
Return the root progress handler; this NEVER returns null - it returns itself if it is the root. |
double |
getTotalWork()
|
void |
increment(double inc)
|
boolean |
isCancelled()
|
void |
setCompleted(double now)
Set the amount of work completed. |
void |
setTotalWork(double work)
Set the current amount of work. |
protected void |
updated()
|
protected boolean |
updateFromSub()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Progress(java.lang.String name)
Method Detail |
---|
public Progress getRoot()
public Progress getParent()
public java.lang.String getName()
public double getTotalWork()
public double getCompletedWork()
public int getPercentage()
public double getFraction()
public java.lang.String getActionPath(int levels)
public void cancel()
public boolean isCancelled()
public void setTotalWork(double work)
work
- name
- public void setCompleted(double now)
now
- public void complete()
public void increment(double inc)
public Progress createSubProgress(java.lang.String name, double work)
protected void updated()
protected boolean updateFromSub()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |