public abstract class EventWorker
extends java.lang.Object
implements java.awt.ActiveEvent
This class is compatible with SwingWorker where it is reasonable to be so. Unlike a SwingWorker it does not use an internal worker thread but has to be dispatched by a dispatcher which handles java.awt.ActiveEvent's.
| Constructor and Description |
|---|
EventWorker() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.Object |
construct()
Compute the value to be returned by the
get method. |
void |
dispatch()
Calls #construct on the current thread and invokes
#finished on the AWT event dispatcher thread.
|
void |
finished()
Called on the event dispatching thread (not on the worker thread)
after the
construct method has returned. |
protected java.lang.Object |
getValue()
Get the value produced by the worker thread, or null if it
hasn't been constructed yet.
|
public void dispatch()
dispatch in interface java.awt.ActiveEventpublic abstract java.lang.Object construct()
get method.public void finished()
construct method has returned.protected java.lang.Object getValue()