public abstract class AbstractProgressBar
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
AbstractProgressBar(double maxProgress,
java.lang.String progressMessage)
Create a new progress bar.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
finish()
Perform any teardown (e.g., close popup window, display completion message)
|
java.lang.String |
getETAString()
Gets the estimated time remaining of the task, or "" if indeterminate
|
double |
getMaxProgress()
Get the max progress value
|
java.lang.String |
getProgressMessage()
Return the user supplied progress message
|
void |
increment()
Helper methods so consumers don't need to keep track of iterations.
|
boolean |
isIndeterminate()
Gets the indeterminate status of the progress bar
|
abstract void |
refreshDisplay()
Update the progress bar display.
|
void |
setIndeterminate(boolean m_indeterminate)
Sets the indeterminate status of the progress bar
|
void |
setMaxProgress(double max)
Set the max progress value
|
void |
setProgress(double progress)
Main update method.
|
void |
setProgressMessage(java.lang.String message)
Set the progress message
|
void |
start()
Initialize all values to 0 and start the progress manager.
|
public AbstractProgressBar(double maxProgress, java.lang.String progressMessage)
maxProgress
- Max progress the bar can reach.progressMessage
- Message to display.public void start()
public void increment()
public abstract void finish()
public abstract void refreshDisplay()
public void setProgress(double progress)
progress
- Actual progress value (e.g., current iteration number)public double getMaxProgress()
public void setMaxProgress(double max)
max
- Maximum value for progress (e.g., max number of iterations)public java.lang.String getProgressMessage()
public void setProgressMessage(java.lang.String message)
message
- Progress Message (e.g., Processing data...)public java.lang.String getETAString()
public boolean isIndeterminate()
public void setIndeterminate(boolean m_indeterminate)
m_indeterminate
- Indeterminate status