|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jext.misc.SwingWorker
public abstract class SwingWorker
This class comes from the SwingWorker class described at the URL below(3rd version), but has substantially changed; http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
Field Summary | |
---|---|
protected HandlingRunnable |
notifier
|
Constructor Summary | |
---|---|
SwingWorker(HandlingRunnable notifier)
Create a thread that will call the work method
and then run |
Method Summary | |
---|---|
void |
finished()
Called on the event dispatching thread (not on the worker thread) after the work method has returned. |
java.lang.Object |
get()
Return the value created by the work method. |
java.lang.Throwable |
getException()
Get the value produced by the worker thread, or null if it hasn't been constructed yet. |
java.lang.Object |
getValue()
Get the value produced by the worker thread, or null if it hasn't been constructed yet. |
void |
interrupt()
A new method that interrupts the worker thread. |
java.lang.Object |
run()
Run the work in the calling thread, and then the notifier callback. |
void |
start()
Start the worker thread. |
abstract java.lang.Object |
work()
Compute the value to be returned by the get method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HandlingRunnable notifier
Constructor Detail |
---|
public SwingWorker(HandlingRunnable notifier)
work
method
and then run
Method Detail |
---|
public java.lang.Object getValue()
public java.lang.Throwable getException()
public abstract java.lang.Object work() throws java.lang.Throwable
get
method.
java.lang.Throwable
public void finished()
work
method has returned.
public void interrupt()
public java.lang.Object get()
work
method.
Returns null if either the constructing thread or the current
thread was interrupted before a value was produced.
work
methodpublic void start()
public java.lang.Object run() throws java.lang.Throwable
notifier
callback.
java.lang.Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |