All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.EventQueue

java.lang.Object
   |
   +----java.awt.EventQueue

public class EventQueue
extends Object
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 the system.


Method Index

 o getEventQueue()
Get the system's EventQueue instance.
 o getNextEvent()
Remove an event from the queue and return it.
 o peekEvent()
Return the first event without removing it.
 o peekEvent(int)
 o postEvent(AWTEvent)
Post a 1.1-style event to the EventQueue.
 o postEvent(Event)
Post a 1.0-style event to the EventQueue.

Methods

 o getEventQueue
  public static EventQueue getEventQueue()
Get the system's EventQueue instance. Although many of the methods in this class are static, methods which modify the EventQueue are not. This allows performing the necessary SecurityManager checks once, eliminating a potential performance bottleneck.

 o postEvent
  public synchronized void postEvent(Event theEvent)
Post a 1.0-style event to the EventQueue.

Parameters:
theEvent - an instance of java.awt.Event.
 o postEvent
  public synchronized void postEvent(AWTEvent theEvent)
Post a 1.1-style event to the EventQueue.

Parameters:
theEvent - an instance of java.awt.AWTEvent, or a subclass of it.
 o getNextEvent
  public synchronized Object getNextEvent() throws InterruptedException
Remove an event from the queue and return it. This method will block until an event has been posted by another thread.

Returns:
the next event, which is either an instance of java.awt.Event or java.awt.AWTEvent.
 o peekEvent
  public synchronized Object peekEvent()
Return the first event without removing it.

Returns:
the first event, which is either an instance of java.awt.Event or java.awt.AWTEvent.
 o peekEvent
  public synchronized Object peekEvent(int id)

All Packages  Class Hierarchy  This Package  Previous  Next  Index