com.jpeterson.x10
Class AWTGatewayQueue
java.lang.Object
|
+--com.jpeterson.x10.GatewayQueue
|
+--com.jpeterson.x10.AWTGatewayQueue
- public class AWTGatewayQueue
- extends GatewayQueue
The AWTGatewayQueue uses the AWT event queue to synchronize control
events with all other AWT events. This should make a Swing GUI thread
safe.
The method post
is used by the class to submit ControlEvents
to the AWTEvent queue. An AWTEventSync object is used to receive the
event from the AWTEvent. The actual ControlEvent is contained within
the AWTEngineEvent received by AWTEventSync. Therefore, AWTEventSync
"cracks" the AWTGatewayEvent, pulling out the ControlEvent and then
calls ControlEventDispather's dispatch
method, passing in the
ControlEvent.
Method Summary |
void |
post(ControlEvent event)
Put an event on the AWT event queue for subsequent processing by the
dispatcher. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CONTROL_EVENT_ID
protected static final int CONTROL_EVENT_ID
AWTGatewayQueue
public AWTGatewayQueue(ControlEventDispatcher dispatcher)
- Create a new gateway queue for processing control messages.
- Parameters:
dispatcher
- ControlEventDispatcher that will dispatch the
control event.
post
public void post(ControlEvent event)
- Put an event on the AWT event queue for subsequent processing by the
dispatcher.
- Overrides:
- post in class GatewayQueue
- Parameters:
event
- ControlEvent to be placed on the queue for subsequent
processing.