|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.EventQueue
EventQueue is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes. There is only one EventQueue for each AppContext.
Field Summary | |
private static boolean |
debug
|
private EventDispatchThread |
dispatchThread
|
private EventQueueItem |
lastPriorityItem
|
private EventQueue |
nextQueue
|
private EventQueue |
previousQueue
|
private EventQueueItem |
queue
|
private EventQueueItem |
queueTail
|
private static int |
threadInitNumber
|
Constructor Summary | |
EventQueue()
|
Method Summary | |
(package private) void |
changeKeyEventFocus(Object newSource)
|
protected void |
dispatchEvent(AWTEvent event)
Dispatch an event. |
(package private) EventDispatchThread |
getDispatchThread()
|
AWTEvent |
getNextEvent()
Remove an event from the queue and return it. |
static void |
invokeAndWait(Runnable runnable)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue. |
static void |
invokeLater(Runnable runnable)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue. |
static boolean |
isDispatchThread()
Returns true if the calling thread is the current AWT EventQueue's dispatch thread. |
private static int |
nextThreadNum()
|
AWTEvent |
peekEvent()
Return the first event without removing it. |
AWTEvent |
peekEvent(int id)
Return the first event with the specified id, if any. |
protected void |
pop()
Stop dispatching events using this EventQueue instance. |
void |
postEvent(AWTEvent theEvent)
Post a 1.1-style event to the EventQueue. |
private void |
postEvent(AWTEvent theEvent,
boolean priorityEvent)
|
void |
push(EventQueue newEventQueue)
Replace the existing EventQueue with the specified one. |
(package private) void |
removeSourceEvents(Object source)
|
(package private) void |
removeSourceEvents(Object source,
int id)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
private static int threadInitNumber
private EventQueueItem queue
private EventQueueItem queueTail
private EventQueueItem lastPriorityItem
private EventQueue nextQueue
private EventQueue previousQueue
private EventDispatchThread dispatchThread
private static final boolean debug
Constructor Detail |
public EventQueue()
Method Detail |
private static int nextThreadNum()
public void postEvent(AWTEvent theEvent)
theEvent
- an instance of java.awt.AWTEvent, or a
subclass of it.private void postEvent(AWTEvent theEvent, boolean priorityEvent)
public AWTEvent getNextEvent() throws InterruptedException
public AWTEvent peekEvent()
public AWTEvent peekEvent(int id)
id
- the id of the type of event desired.protected void dispatchEvent(AWTEvent event)
Event Type | Source Type | Dispatched To |
---|---|---|
ActiveEvent | Any | event.dispatch() |
Other | Component | source.dispatchEvent(AWTEvent) |
Other | MenuComponent | source.dispatchEvent(AWTEvent) |
Other | Other | No action (ignored) |
theEvent
- an instance of java.awt.AWTEvent, or a
subclass of it.public void push(EventQueue newEventQueue)
an
- EventQueue (or subclass thereof) instance to be used.pop()
protected void pop() throws EmptyStackException
push(java.awt.EventQueue)
public static boolean isDispatchThread()
final EventDispatchThread getDispatchThread()
final void changeKeyEventFocus(Object newSource)
final void removeSourceEvents(Object source)
void removeSourceEvents(Object source, int id)
public static void invokeLater(Runnable runnable)
runnable
- the Runnable whose run() method should be executed
synchronously on the EventQueueinvokeAndWait(java.lang.Runnable)
public static void invokeAndWait(Runnable runnable) throws InterruptedException, java.lang.reflect.InvocationTargetException
runnable
- the Runnable whose run() method should be executed
synchronously on the EventQueueinvokeLater(java.lang.Runnable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |