|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.gui.event.EventWorker
public abstract class EventWorker
This is an abstract class that you subclass to perform GUI-related work in a dedicated event dispatcher.
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 Summary | |
|---|---|
EventWorker()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventWorker()
| Method Detail |
|---|
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()
|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||