Collaboration diagram for guiUtilities.SwingWorker:
Public Member Functions | |
abstract Object | construct () |
Compute the value to be returned by the get method. | |
void | finished () |
Called on the event dispatching thread (not on the worker thread) after the construct method has returned. | |
void | interrupt () |
A new method that interrupts the worker thread. | |
Object | get () |
Return the value created by the construct method. | |
SwingWorker () | |
Start a thread that will call the construct method and then exit. | |
void | start () |
Start the worker thread. | |
Protected Member Functions | |
synchronized Object | getValue () |
Get the value produced by the worker thread, or null if it hasn't been constructed yet. | |
Private Member Functions | |
synchronized void | setValue (Object x) |
Set the value produced by worker thread. | |
Private Attributes | |
Object | value |
ThreadVar | threadVar |
For instructions on and examples of using this class, see:
http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
Note that the API changed slightly in the 3rd version: You must now invoke start() on the SwingWorker after creating it.
Definition at line 16 of file SwingWorker.java.
|
Return the value created by the Returns null if either the constructing thread or the current thread was interrupted before a value was produced.
Definition at line 78 of file SwingWorker.java. References guiUtilities.SwingWorker.ThreadVar.get(), and guiUtilities.SwingWorker.getValue(). |
Here is the call graph for this function:
|
A new method that interrupts the worker thread. Call this method to force the worker to stop what it's doing. Definition at line 63 of file SwingWorker.java. References guiUtilities.SwingWorker.ThreadVar.clear(), and guiUtilities.SwingWorker.ThreadVar.get(). |
Here is the call graph for this function: