|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.EventQueue
Constructor Summary | |
EventQueue()
|
Method Summary | |
void | addEventQueueListener(EventQueueListener l)
Adds an EventListener to receive AWTEvents from this EventQueue. |
protected void | dispatchEvent(AWTEvent event)
Dispatch an event to its source. |
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 this EventQueue's dispatch thread. |
protected void | notifyEventQueueListeners(AWTEvent theEvent)
This method notifies any EventQueueListeners that an event has been posted to the EventQueue. |
AWTEvent | peekEvent()
Return the first event without removing it. |
AWTEvent | peekEvent(int id)
|
protected void | pop()
Stop dispatching events using this EventQueue instance. |
void | postEvent(AWTEvent theEvent)
Post a 1.1-style event to the EventQueue. |
void | push(EventQueue newEventQueue)
Replace the existing EventQueue with the specified one. |
void | removeEventQueueListener(EventQueueListener l)
Removes an EventListener so that it no longer receives events from this EventQueue. |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
public EventQueue()
Method Detail |
public void postEvent(AWTEvent theEvent)
theEvent
- an instance of java.awt.AWTEvent, or a
subclass of it.public AWTEvent getNextEvent() throws InterruptedException
public AWTEvent peekEvent()
public AWTEvent peekEvent(int id)
protected void dispatchEvent(AWTEvent event)
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.protected void pop() throws EmptyStackException
public static boolean isDispatchThread()
public void addEventQueueListener(EventQueueListener l)
Note: event listener use is not recommended for normal application use, but are intended solely to support special purpose facilities including support for accessibility, event record/playback, and diagnostic tracing.
l
- the event listener.java.awt.EventQueueListener
,
removeEventQueueListener(java.awt.event.EventQueueListener)
public void removeEventQueueListener(EventQueueListener l)
Note: event listener use is not recommended for normal application use, but are intended solely to support special purpose facilities including support for accessibility, event record/playback, and diagnostic tracing.
l
- the event listener.java.awt.EventQueueListener
,
addEventQueueListener(java.awt.event.EventQueueListener)
protected void notifyEventQueueListeners(AWTEvent theEvent)
super.postEvent(event)
.
theEvent
- the event which has been posted to the EventQueue.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, InvocationTargetException
runnable
- the Runnable whose run() method should be executed
synchronously on the EventQueueinvokeLater(java.lang.Runnable)
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |