Package mgui.interfaces
Interface ProgressUpdater
- All Known Implementing Classes:
AbstractProgressUpdater,InterfaceProgressBar
public interface ProgressUpdater
Interface specifying methods to enable progress updates. Allows specifies a method (isCancelled
for checking whether user has cancelled a procedure.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classProgressUpdater.Mode -
Method Summary
Modifier and Type Method Description booleanallowChanges()Allow processes to change the settings of this progress bar? Implementing classes can choose whether or not to enforce this.voidcancel()Cancels execution of the process monitored by this updater.voidderegister()Deregisters this progress updater with the ModelGUI sessionintgetMaximum()intgetMinimum()booleanisCancelled()Indicates whether the monitored process has been cancelledvoiditerate()Increment progress by 1voidregister()Registers this progress updater with the ModelGUI sessionvoidreset()voidsetIndeterminate(boolean b)Sets whether this progress updater should be considered indeterminate; i.e., progress cannot be estimated.voidsetMaximum(int max)voidsetMessage(java.lang.String message)Sets the message for this progress updatervoidsetMinimum(int min)voidsetMode(ProgressUpdater.Mode mode)voidupdate(int t)Uodates the value of this progress indicator
-
Method Details
-
iterate
void iterate()Increment progress by 1 -
update
void update(int t)Uodates the value of this progress indicator- Parameters:
t-
-
setMinimum
void setMinimum(int min) -
setMaximum
void setMaximum(int max) -
getMinimum
int getMinimum() -
getMaximum
int getMaximum() -
cancel
void cancel()Cancels execution of the process monitored by this updater. The process must respect the cancel notification for this call to have effect. -
isCancelled
boolean isCancelled()Indicates whether the monitored process has been cancelled- Returns:
-
setMode
-
reset
void reset() -
register
void register()Registers this progress updater with the ModelGUI session -
deregister
void deregister()Deregisters this progress updater with the ModelGUI session -
setMessage
void setMessage(java.lang.String message)Sets the message for this progress updater- Parameters:
message-
-
setIndeterminate
void setIndeterminate(boolean b)Sets whether this progress updater should be considered indeterminate; i.e., progress cannot be estimated.- Parameters:
b-
-
allowChanges
boolean allowChanges()Allow processes to change the settings of this progress bar? Implementing classes can choose whether or not to enforce this.- Returns:
-