|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.swing.SwingProgressReporter
public class SwingProgressReporter
A swing implementation of a progress reporter window. This is similar to a ProgressMonitor except that it doesn't have any of the delayed pop-up characteristics. It also supports a progress bar that is in an indeterminate state. This class may someday support progress aggregation by allowing multiple tasks to be registered. In that case, it will have to be wrapped by separate progress reporters for each sub-task or it can provide progress monitors for its subtasks.
Constructor Summary | |
---|---|
SwingProgressReporter(java.awt.Component parent,
java.lang.String title,
java.lang.String message,
int min,
int max)
Creates a new progress reporter that uses a swing JOptionPane to display status. |
Method Summary | |
---|---|
void |
done()
Indicates that the operation has completed. |
int |
getMaximum()
Returns the maximum progress value. |
java.lang.String |
getMessage()
Returns the string message associated with the current part of the task being performed. |
int |
getMinimum()
Returns the minimum progress value. |
int |
getProgress()
Returns the current progress amount. |
boolean |
isCanceled()
Returns true when the operation has been canceled by the user. |
void |
setMaximum(int val)
Sets the maximum progress value. |
void |
setMessage(java.lang.String message)
Sets the string message associated with the current part of the task being performed. |
void |
setMinimum(int val)
Sets the minimum progress value. |
void |
setProgress(int val)
Sets the current progress amount. |
protected boolean |
shouldBeIndeterminate()
Returns true if the bar should be indeterminate based on its min/max values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwingProgressReporter(java.awt.Component parent, java.lang.String title, java.lang.String message, int min, int max)
Method Detail |
---|
protected boolean shouldBeIndeterminate()
public void setMessage(java.lang.String message)
setMessage
in interface ProgressReporter
public java.lang.String getMessage()
getMessage
in interface ProgressReporter
public void setProgress(int val)
setProgress
in interface ProgressReporter
public int getProgress()
getProgress
in interface ProgressReporter
public void setMinimum(int val)
setMinimum
in interface ProgressReporter
public int getMinimum()
getMinimum
in interface ProgressReporter
public void setMaximum(int val)
setMaximum
in interface ProgressReporter
public int getMaximum()
getMaximum
in interface ProgressReporter
public boolean isCanceled()
isCanceled
in interface ProgressReporter
public void done()
done
in interface ProgressReporter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |