Package mgui.interfaces.gui
Class AbstractProgressUpdater
java.lang.Object
mgui.interfaces.gui.AbstractProgressUpdater
- All Implemented Interfaces:
ProgressUpdater
public abstract class AbstractProgressUpdater extends java.lang.Object implements ProgressUpdater
An abstract updater with default implementations for all methods
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested classes/interfaces inherited from interface mgui.interfaces.ProgressUpdater
ProgressUpdater.Mode -
Field Summary
Fields Modifier and Type Field Description protected booleanallow_changesprotected intcurrent_valueprotected booleanis_cancelledprotected booleanis_indeterminateprotected intmaximumprotected java.lang.Stringmessageprotected intminimum -
Constructor Summary
Constructors Constructor Description AbstractProgressUpdater() -
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 indicatorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
current_value
protected int current_value -
minimum
protected int minimum -
maximum
protected int maximum -
is_cancelled
protected boolean is_cancelled -
message
protected java.lang.String message -
is_indeterminate
protected boolean is_indeterminate -
allow_changes
protected boolean allow_changes
-
-
Constructor Details
-
AbstractProgressUpdater
public AbstractProgressUpdater()
-
-
Method Details
-
iterate
public void iterate()Description copied from interface:ProgressUpdaterIncrement progress by 1- Specified by:
iteratein interfaceProgressUpdater
-
update
public void update(int t)Description copied from interface:ProgressUpdaterUodates the value of this progress indicator- Specified by:
updatein interfaceProgressUpdater
-
setMinimum
public void setMinimum(int min)- Specified by:
setMinimumin interfaceProgressUpdater
-
setMaximum
public void setMaximum(int max)- Specified by:
setMaximumin interfaceProgressUpdater
-
getMinimum
public int getMinimum()- Specified by:
getMinimumin interfaceProgressUpdater
-
getMaximum
public int getMaximum()- Specified by:
getMaximumin interfaceProgressUpdater
-
cancel
public void cancel()Description copied from interface:ProgressUpdaterCancels execution of the process monitored by this updater. The process must respect the cancel notification for this call to have effect.- Specified by:
cancelin interfaceProgressUpdater
-
isCancelled
public boolean isCancelled()Description copied from interface:ProgressUpdaterIndicates whether the monitored process has been cancelled- Specified by:
isCancelledin interfaceProgressUpdater- Returns:
-
setMode
- Specified by:
setModein interfaceProgressUpdater
-
reset
public void reset()- Specified by:
resetin interfaceProgressUpdater
-
register
public void register()Description copied from interface:ProgressUpdaterRegisters this progress updater with the ModelGUI session- Specified by:
registerin interfaceProgressUpdater
-
deregister
public void deregister()Description copied from interface:ProgressUpdaterDeregisters this progress updater with the ModelGUI session- Specified by:
deregisterin interfaceProgressUpdater
-
setMessage
public void setMessage(java.lang.String message)Description copied from interface:ProgressUpdaterSets the message for this progress updater- Specified by:
setMessagein interfaceProgressUpdater
-
setIndeterminate
public void setIndeterminate(boolean b)Description copied from interface:ProgressUpdaterSets whether this progress updater should be considered indeterminate; i.e., progress cannot be estimated.- Specified by:
setIndeterminatein interfaceProgressUpdater
-
allowChanges
public boolean allowChanges()Description copied from interface:ProgressUpdaterAllow processes to change the settings of this progress bar? Implementing classes can choose whether or not to enforce this.- Specified by:
allowChangesin interfaceProgressUpdater- Returns:
-