|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcharva.awt.EventQueue
public class EventQueue
The EventQueue class queues "AWT" events, which are used to trigger drawing actions. They can be enqueued using the postEvent() method by any thread (e.g the keyboard reading thread enqueues KeyEvents), but only the event-dispatching thread should call getNextEvent(), because only the event-dispatching thread should do any drawing. This is because the ncurses library is not re-entrant.
SyncEvents are enqueued with a lower priority than other events, and if multiple SyncEvents are found on the queue they are coalesced into a single SyncEvent.
Method Summary | |
---|---|
static EventQueue |
getInstance()
|
AWTEvent |
getNextEvent()
This method is only called if we know that an event is available. |
static void |
invokeLater(java.lang.Runnable runnable_)
Causes the runnable's run() method to be called in the AWT dispatch thread. |
void |
postEvent(AWTEvent evt_)
|
boolean |
queuesAreEmpty()
Returns true if both the high-priority queue and the low-priority queue are empty. |
AWTEvent |
waitForNextEvent()
Block until an event is available, then return the event. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EventQueue getInstance()
public void postEvent(AWTEvent evt_)
public AWTEvent waitForNextEvent()
public AWTEvent getNextEvent()
public static void invokeLater(java.lang.Runnable runnable_)
public boolean queuesAreEmpty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |