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 boolean
allow_changes
protected int
current_value
protected boolean
is_cancelled
protected boolean
is_indeterminate
protected int
maximum
protected java.lang.String
message
protected int
minimum
-
Constructor Summary
Constructors Constructor Description AbstractProgressUpdater()
-
Method Summary
Modifier and Type Method Description boolean
allowChanges()
Allow processes to change the settings of this progress bar? Implementing classes can choose whether or not to enforce this.void
cancel()
Cancels execution of the process monitored by this updater.void
deregister()
Deregisters this progress updater with the ModelGUI sessionint
getMaximum()
int
getMinimum()
boolean
isCancelled()
Indicates whether the monitored process has been cancelledvoid
iterate()
Increment progress by 1void
register()
Registers this progress updater with the ModelGUI sessionvoid
reset()
void
setIndeterminate(boolean b)
Sets whether this progress updater should be considered indeterminate; i.e., progress cannot be estimated.void
setMaximum(int max)
void
setMessage(java.lang.String message)
Sets the message for this progress updatervoid
setMinimum(int min)
void
setMode(ProgressUpdater.Mode mode)
void
update(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:ProgressUpdater
Increment progress by 1- Specified by:
iterate
in interfaceProgressUpdater
-
update
public void update(int t)Description copied from interface:ProgressUpdater
Uodates the value of this progress indicator- Specified by:
update
in interfaceProgressUpdater
-
setMinimum
public void setMinimum(int min)- Specified by:
setMinimum
in interfaceProgressUpdater
-
setMaximum
public void setMaximum(int max)- Specified by:
setMaximum
in interfaceProgressUpdater
-
getMinimum
public int getMinimum()- Specified by:
getMinimum
in interfaceProgressUpdater
-
getMaximum
public int getMaximum()- Specified by:
getMaximum
in interfaceProgressUpdater
-
cancel
public void cancel()Description copied from interface:ProgressUpdater
Cancels execution of the process monitored by this updater. The process must respect the cancel notification for this call to have effect.- Specified by:
cancel
in interfaceProgressUpdater
-
isCancelled
public boolean isCancelled()Description copied from interface:ProgressUpdater
Indicates whether the monitored process has been cancelled- Specified by:
isCancelled
in interfaceProgressUpdater
- Returns:
-
setMode
- Specified by:
setMode
in interfaceProgressUpdater
-
reset
public void reset()- Specified by:
reset
in interfaceProgressUpdater
-
register
public void register()Description copied from interface:ProgressUpdater
Registers this progress updater with the ModelGUI session- Specified by:
register
in interfaceProgressUpdater
-
deregister
public void deregister()Description copied from interface:ProgressUpdater
Deregisters this progress updater with the ModelGUI session- Specified by:
deregister
in interfaceProgressUpdater
-
setMessage
public void setMessage(java.lang.String message)Description copied from interface:ProgressUpdater
Sets the message for this progress updater- Specified by:
setMessage
in interfaceProgressUpdater
-
setIndeterminate
public void setIndeterminate(boolean b)Description copied from interface:ProgressUpdater
Sets whether this progress updater should be considered indeterminate; i.e., progress cannot be estimated.- Specified by:
setIndeterminate
in interfaceProgressUpdater
-
allowChanges
public boolean allowChanges()Description copied from interface:ProgressUpdater
Allow processes to change the settings of this progress bar? Implementing classes can choose whether or not to enforce this.- Specified by:
allowChanges
in interfaceProgressUpdater
- Returns:
-