textbender.o.awt
Class EventQueueX

java.lang.Object
  extended by EventQueueX

public final class EventQueueX
extends Object

EventQueue utilities.


Method Summary
static void invokeNowOrLater(Runnable runnable)
          Invokes the runnable now, if called from the dispatch thread; otherwise schedules it to be invoked in a later dispatch thread.
static void invokeNowOrWait(Runnable runnable)
          Invokes the runnable now, if called from the dispatch thread; otherwise waits for a dispatch thread.
static void tryInvokeAndWait(Runnable runnable)
          A version of invokeAndWait() that throws only unchecked exceptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invokeNowOrLater

public static void invokeNowOrLater(Runnable runnable)
Invokes the runnable now, if called from the dispatch thread; otherwise schedules it to be invoked in a later dispatch thread.


invokeNowOrWait

public static void invokeNowOrWait(Runnable runnable)
Invokes the runnable now, if called from the dispatch thread; otherwise waits for a dispatch thread.

Throws:
AssertionError - if assertions are enabled, and an InterruptedException occurs
RuntimeException - if an InvocationTargetException occurs

tryInvokeAndWait

public static void tryInvokeAndWait(Runnable runnable)
A version of invokeAndWait() that throws only unchecked exceptions.

Throws:
RuntimeException - nesting any InterruptedException or InvocationTargetException that occurs