|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttools.progressbar.AbstractProgressBar
public abstract class AbstractProgressBar
General class for progress bars. This class does the management and computations. The visualization should be done in implementing classes. The principle is, setting a number of "calls" and calling this class exactly that often. Example: setNumberOfTotalCalls(5) for (int i=0; i<5; i++) { DisplayBar(); }
Constructor Summary | |
---|---|
AbstractProgressBar()
|
Method Summary | |
---|---|
void |
DisplayBar()
Call this function, to set the counter one step further to totalCalls. |
void |
DisplayBar(java.lang.String additionalText)
Call this function, to set the counter one step further to totalCalls. |
void |
DisplayBar(java.lang.String additionalText,
boolean omitTimeCount)
See DisplayBar(String) . |
abstract void |
finished()
This method is called automatically, when all calculations are finished (callNr=TotalCalls). |
long |
getCallNumber()
|
boolean |
getEstimateTime()
|
void |
reset()
|
void |
setCallNr(long callNr)
|
void |
setEstimateTime(boolean estimateTime)
|
void |
setNumberOfTotalCalls(long totalCalls)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractProgressBar()
Method Detail |
---|
public void reset()
public void setNumberOfTotalCalls(long totalCalls)
public void setEstimateTime(boolean estimateTime)
public boolean getEstimateTime()
public long getCallNumber()
public void DisplayBar()
public void DisplayBar(java.lang.String additionalText)
additionalText
- - Any additional text (e.g. "Best item found so far XYZ")public void DisplayBar(java.lang.String additionalText, boolean omitTimeCount)
DisplayBar(String)
.
omitTimeCount
- - If true, increases call number, but does not include this call
into the ETA estimation. Does also NOT reset the timer, if true.public abstract void finished()
public void setCallNr(long callNr)
callNr
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |