|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object abbot.util.SingleThreadedEventListener
public abstract class SingleThreadedEventListener
Provide an AWTEventListener which ensures all events are handled on the event dispatch thread. This allows the recorders and other listeners to safely manipulate GUI objects without concern for event dispatch thread-safety.
Window.show generates WINDOW_OPENED (and possibly hierarchy and other events) to any listeners from whatever thread the method was invoked on.
NOTE: Applet runners may run several simultaneous event dispatch threads when displaying multiple applets simultaneously. If this listener is installed in the parent context of those dispatch threads, it will be invoked on each of those threads, possibly simultaneously.
Constructor Summary | |
---|---|
SingleThreadedEventListener()
|
Method Summary | |
---|---|
void |
eventDispatched(AWTEvent event)
Event reception callback. |
protected void |
processDeferredEvents()
Process any events that were generated off the event queue but not immediately handled. |
protected abstract void |
processEvent(AWTEvent event)
This method is not protected by any synchronization locks (nor should it be); in the presence of multiple simultaneous event dispatch threads, the listener must be threadsafe. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleThreadedEventListener()
Method Detail |
---|
public void eventDispatched(AWTEvent event)
eventDispatched
in interface AWTEventListener
protected void processDeferredEvents()
protected abstract void processEvent(AWTEvent event)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |