public class XProgressBarListener extends java.lang.Object implements XProgressListener
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JProgressBar |
progressBar
Controlled progress bar.
|
protected int |
startValue
Start value to use in progress bar.
|
protected int |
stopValue
Stop value to use in progress bar.
|
Constructor and Description |
---|
XProgressBarListener(javax.swing.JProgressBar progressBar)
Creates a new progress bar listener with the specified progress
bar for display.
|
XProgressBarListener(javax.swing.JProgressBar progressBar,
int startValue,
int stopValue)
Creates a new progress bar listener with the specified progress
bar for display.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAborted()
Checks whether the monitored process has been canceled.
|
void |
updateProgress(int progress,
int maxProgress)
Notifies the listener about progress being made.
|
protected javax.swing.JProgressBar progressBar
protected int startValue
protected int stopValue
public XProgressBarListener(javax.swing.JProgressBar progressBar)
progressBar
- Progress bar to display progress.public XProgressBarListener(javax.swing.JProgressBar progressBar, int startValue, int stopValue)
progressBar
- Progress bar to display progress.startValue
- When the progress listener begins, this will be
the displayed value on the progress bar.stopValue
- When the progress listener is completed, this will
be the displayed value on the progress bar.public void updateProgress(int progress, int maxProgress)
XProgressListener
updateProgress
in interface XProgressListener
progress
- Current progress step achieved.maxProgress
- Maximal progress steps available.public boolean isAborted()
isAborted
in interface XProgressListener