|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.gui.monitor.TaskMonitor<T,V>
T - the result type returned by the Task doInBackground and get methodsV - the type used for carrying out intermediate results by this
Task publish and process methodspublic class TaskMonitor<T,V>
Monitor that displays a progress dialog for a Task.
| Constructor Summary | |
|---|---|
TaskMonitor(Task<T,V> task,
JComponent component,
String title,
Object messageList,
int maximum)
Constructor |
|
| Method Summary | |
|---|---|
protected JDialog |
createDialog()
Creates the dialog |
boolean |
isCancelled()
Returns the cancellation state |
void |
onNoteChanged(Task<T,V> task,
String note)
This method is called when the task publishes a new note for the task monitor. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
setCancellable(boolean cancellable)
Sets if the task can be cancelled or not |
void |
setInitialNote(String note)
Sets the initial note message for the progress dialog |
void |
setMaximum(int max)
Updates the maximum number of steps of the progress bar |
T |
start()
Starts the task |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TaskMonitor(Task<T,V> task,
JComponent component,
String title,
Object messageList,
int maximum)
task - Task to runcomponent - Parent component for the progress dialogtitle - Title for the dialogmessageList - List of message, as specified in JOptionPanemaximum - Maximum of steps for the progress bar. If set to 0, the
progress bar is set
indeterminate.| Method Detail |
|---|
public boolean isCancelled()
true if the task has been cancelled.
public void onNoteChanged(Task<T,V> task,
String note)
TaskListener
onNoteChanged in interface TaskListener<T,V>task - Tasknote - Notepublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpublic void setCancellable(boolean cancellable)
cancellable - Cancellable statepublic void setInitialNote(String note)
note - Note messagepublic void setMaximum(int max)
max - Number of steps
public T start()
throws TaskException
TaskException - If the task throws an exception during its executionprotected JDialog createDialog()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||