Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Standard Edition |
|||||||||
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.
Constructor Summary | |
EventQueue()
|
Method Summary | |
protected void |
dispatchEvent(AWTEvent event)
Dispatch an event. |
AWTEvent |
getNextEvent()
Remove an event from the EventQueue 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. |
AWTEvent |
peekEvent()
Return the first event on the EventQueue 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. |
void |
push(EventQueue newEventQueue)
Replace the existing EventQueue with the specified one. |
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)
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()
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)
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |