/[classpath]/classpath/java/awt/EventQueue.java
ViewVC logotype

Diff of /classpath/java/awt/EventQueue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by ericb, Sat Mar 30 12:02:29 2002 UTC revision 1.9 by mkoch, Mon Dec 23 12:45:46 2002 UTC
# Line 151  public class EventQueue Line 151  public class EventQueue
151     * Posts a new event to the queue.     * Posts a new event to the queue.
152     *     *
153     * @param event The event to post to the queue.     * @param event The event to post to the queue.
154       *
155       * @exception NullPointerException If event is null.
156     */     */
157    public synchronized void postEvent(AWTEvent evt)    public synchronized void postEvent(AWTEvent evt)
158    {    {
# Line 209  public class EventQueue Line 211  public class EventQueue
211      notify();      notify();
212    }    }
213    
214    /** @since JDK1.2 */    /**
215       * Causes runnable to have its run method called in the dispatch thread of the
216       * EventQueue. This will happen after all pending events are processed. The
217       * call blocks until this has happened. This method will throw an Error if
218       * called from the event dispatcher thread.
219       *
220       * @exception InterruptedException If another thread has interrupted
221       * this thread.
222       * @exception InvocationTargetException If an exception is thrown when running
223       * runnable.
224       *
225       * @since 1.2
226       */
227    public static void invokeAndWait(Runnable runnable)    public static void invokeAndWait(Runnable runnable)
228      throws InterruptedException, InvocationTargetException      throws InterruptedException, InvocationTargetException
229    {    {
# Line 254  public class EventQueue Line 268  public class EventQueue
268      * All pending events are transferred to the new queue. Calls to postEvent,      * All pending events are transferred to the new queue. Calls to postEvent,
269      * getNextEvent, and peekEvent are forwarded to the pushed queue until it      * getNextEvent, and peekEvent are forwarded to the pushed queue until it
270      * is removed with a pop().      * is removed with a pop().
271        *
272        * @exception NullPointerException if newEventQueue is null.
273      */      */
274    public synchronized void push(EventQueue newEventQueue)    public synchronized void push(EventQueue newEventQueue)
275    {    {
# Line 271  public class EventQueue Line 287  public class EventQueue
287    }    }
288    
289    /** Transfer any pending events from this queue back to the parent queue that    /** Transfer any pending events from this queue back to the parent queue that
290      * was previously push()ed. Event dispatch from this queue is suspended. */      * was previously push()ed. Event dispatch from this queue is suspended.
291        *
292        * @exception EmptyStackException If no previous push was made on this
293        * EventQueue.
294        */
295    protected void pop() throws EmptyStackException    protected void pop() throws EmptyStackException
296    {    {
297      if (prev == null)      if (prev == null)
# Line 297  public class EventQueue Line 317  public class EventQueue
317        }        }
318    }    }
319    
320      /**
321       * Dispatches an event. The manner in which the event is dispatched depends
322       * upon the type of the event and the type of the event's source object.
323       *
324       * @exception NullPointerException If event is null.
325       */
326    protected void dispatchEvent(AWTEvent evt)    protected void dispatchEvent(AWTEvent evt)
327    {    {
328      if (evt instanceof ActiveEvent)      if (evt instanceof ActiveEvent)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26