All Implemented Interfaces:
A mechanism for ensuring that a series of AWTEvents are executed in a
precise order, even across multiple AppContexts. The nested events will be
dispatched in the order in which their wrapping SequencedEvents were
constructed. The only exception to this rule is if the peer of the target of
the nested event was destroyed (with a call to Component.removeNotify)
before the wrapping SequencedEvent was able to be dispatched. In this case,
the nested event is never dispatched.
David - Mendenhall
|Fields inherited from java.awt.AWTEvent: |
| id, consumed, focusManagerIsDispatching, isPosted, COMPONENT_EVENT_MASK, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, WINDOW_EVENT_MASK, ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, ITEM_EVENT_MASK, TEXT_EVENT_MASK, INPUT_METHOD_EVENT_MASK, INPUT_METHODS_ENABLED_MASK, PAINT_EVENT_MASK, INVOCATION_EVENT_MASK, HIERARCHY_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, WINDOW_STATE_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, RESERVED_ID_MAX|
public SequencedEvent(AWTEvent nested)
Constructs a new SequencedEvent which will dispatch the specified
nested - the AWTEvent which this SequencedEvent's dispatch()
method will dispatch
|Methods from java.lang.Object:|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait|
|Method from java.awt.SequencedEvent Detail:|
public final void dispatch()
Dispatches the nested event after all previous nested events have been
dispatched or disposed. If this method is invoked before all previous nested events
have been dispatched, then this method blocks until such a point is
While waiting disposes nested events to disposed AppContext
NOTE: Locking protocol. Since dispose() can get EventQueue lock,
dispatch() shall never call dispose() while holding the lock on the list,
as EventQueue lock is held during dispatching. The locks should be acquired
in the same order.
final void dispose()
Disposes of this instance. This method is invoked once the nested event
has been dispatched and handled, or when the peer of the target of the
nested event has been disposed with a call to Component.removeNotify.
NOTE: Locking protocol. Since SunToolkit.postEvent can get EventQueue lock,
it shall never be called while holding the lock on the list,
as EventQueue lock is held during dispatching and dispatch() will get
lock on the list. The locks should be acquired in the same order.
public final boolean isFirstOrDisposed()
Sequenced events are dispatched in order, so we cannot dispatch
until we are the first sequenced event in the queue (i.e. it's our
turn). But while we wait for our turn to dispatch, the event
could have been disposed for a number of reasons.