public class TimeLimitedProgressUpdater extends DefaultProgressUpdater
DefaultProgressUpdater. It prints the
percentage of iterations that is already done on the screen. Furthermore it
limits the time of the progress. If a progress calls the method
isCancelled() and the time given in the constructor has passed
false is returned. Be aware: this class does not stop a progress
after a certain time, it only answers on request. The user has to stop the
progress!max| Constructor and Description |
|---|
TimeLimitedProgressUpdater(Time t,
int sec,
int min,
int hours,
int days)
Creates a new
TimeLimitedProgressUpdater. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isCancelled()
Specifies if the process is cancelled by the user.
|
void |
setValue(int value)
Sets the current value the supervised process has reached.
|
String |
toString() |
setMaxpublic TimeLimitedProgressUpdater(Time t, int sec, int min, int hours, int days) throws IllegalArgumentException
TimeLimitedProgressUpdater.t - the current used timesec - secondsmin - minuteshours - hoursdays - daysIllegalArgumentException - if one of sec, min,
hours or days is less than 0Time,
RealTime,
UserTimepublic void setValue(int value)
ProgressUpdatersetValue in interface ProgressUpdatersetValue in class DefaultProgressUpdatervalue - the current valuepublic boolean isCancelled()
ProgressUpdaterisCancelled in interface ProgressUpdaterisCancelled in class DefaultProgressUpdatertrue if process was cancelled, false
otherwise