public class GUIProgressUpdater extends Object implements ProgressUpdater, ActionListener
ProgressUpdater
with a GUI.Constructor and Description |
---|
GUIProgressUpdater(boolean cancelButton)
This is the constructor for a
GUIProgressUpdater . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
protected void |
finalize() |
boolean |
isCancelled()
Specifies if the process is cancelled by the user.
|
void |
setMax(int max)
Sets the maximal value that will be set by
ProgressUpdater.setValue(int) , so a
value of max indicates the end of the supervised method call. |
void |
setValue(int value)
Sets the current value the supervised process has reached.
|
public GUIProgressUpdater(boolean cancelButton)
GUIProgressUpdater
. It enables the
programmer to add a cancel button.cancelButton
- true
if the cancel button shall be addedpublic void setMax(int max)
ProgressUpdater
ProgressUpdater.setValue(int)
, so a
value of max indicates the end of the supervised method call.setMax
in interface ProgressUpdater
max
- the maximal valuepublic void setValue(int value)
ProgressUpdater
setValue
in interface ProgressUpdater
value
- the current valueprotected void finalize() throws Throwable
public boolean isCancelled()
ProgressUpdater
isCancelled
in interface ProgressUpdater
true
if process was cancelled, false
otherwisepublic void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener