|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Classes that perform long tasks (like graph algorithms) can implement this interface
so that they can be monitored by a GUI like a javax.swing.plaf.ProgressBarUI
or a
javax.swing.ProgressMonitor
Method Summary | |
int |
getCurrentProgress()
|
java.lang.String |
getCurrentStatusMessage()
|
int |
getLengthOfTask()
|
java.lang.String |
getTaskDescription()
|
boolean |
isDone()
|
void |
start(boolean return_when_done)
Starts doing the task in a separate thread so that the GUI stays responsive |
void |
stop()
Stops the task if it is currently running. |
boolean |
wasCanceled()
|
Method Detail |
public boolean isDone()
true
if the task is done, false otherwisepublic int getCurrentProgress()
public int getLengthOfTask()
public java.lang.String getTaskDescription()
String
describing the task being performedpublic java.lang.String getCurrentStatusMessage()
String
status message describing what the task
is currently doing (example: "Completed 23% of total.", "Initializing...", etc).public void start(boolean return_when_done)
return_when_done
- if true
, then this method will return only when
the task is done, else, it will return immediately after spawning the thread that
performs the taskpublic void stop()
public boolean wasCanceled()
true
if the task was canceled before it was done
(for example, by calling MonitorableSwingWorker.stop()
,
false
otherwise
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |