public class Progress extends java.lang.Object implements CancelationComponent
Modifier and Type | Field and Description |
---|---|
protected javax.swing.ProgressMonitor |
progress |
Modifier | Constructor and Description |
---|---|
protected |
Progress()
Creates an empty progress bar (non-initialized).
|
|
Progress(int minimum,
int maximum)
Creates a progress bar with the given minimum and maximum range and an
empty default caption.
|
|
Progress(javax.swing.JComponent c,
java.lang.String caption,
int minimum,
int maximum) |
|
Progress(java.lang.String caption)
Creates a progress bar with the given caption and a default range from 0
to 100.
|
|
Progress(java.lang.String caption,
int minimum,
int maximum)
Creates a progress bar with given caption, minimum and maximum range.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this progress bar.
|
protected void |
doUpdate(java.lang.Runnable r)
TODO: comment what this method exactly does (and when it should be used)
|
int |
getMaximum()
Retrieves the current maximum range value of this progress bar.
|
java.lang.String |
getNote() |
void |
inc()
Increments the progress status by exactly 1.
|
boolean |
isCanceled()
Determines whether the user has clicked the "cancel" button of this
progress dialog.
|
void |
setMaximum(int m)
Sets the maximum range value of the progress bar ('to' value).
|
void |
setMinimum(int m)
Sets the minimum range value of the progress bar ('from' value)
|
void |
setMinMax(int min,
int max)
Sets both the minimum and maximum range value of the progress bar ('from'
and 'to' values).
|
void |
setNote(java.lang.String note)
Sets the text to be displayed in the progress dialog.
|
void |
setProgress(int nv)
Sets the progress status to the given value.
|
public Progress(java.lang.String caption)
caption
- the text to be displayed above the progress visualizationpublic Progress(int minimum, int maximum)
minimum
- the minimum range value (from)maximum
- the maximum range value (t0)public Progress(java.lang.String caption, int minimum, int maximum)
caption
- the text to be displayed above the progress visualizationminimum
- the minimum range value (from)maximum
- the maximum range value (to)public Progress(javax.swing.JComponent c, java.lang.String caption, int minimum, int maximum)
protected Progress()
public void close()
public boolean isCanceled()
isCanceled
in interface CancelationComponent
true
if user has clicked "cancel",
false
otherwisepublic void setMaximum(int m)
m
- the number towards the progress will movepublic int getMaximum()
public void setMinimum(int m)
m
- the number from which the progress will movepublic void setMinMax(int min, int max)
min
- the number from which the progress will movemax
- the number towards the progress will movepublic void setNote(java.lang.String note)
note
- the updated text to be displayed in progress dialogpublic java.lang.String getNote()
public void setProgress(int nv)
nv
- the new progress statuspublic void inc()
setProgress(int)
protected void doUpdate(java.lang.Runnable r)
r
-