|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines methods that are intended to be useful for systems/GUIs, that have a special 'event dispatch thread' - a special thread, that is only allowed to modify the GUI and that is the only thread to handle GUI events from the system. An example for this is Swing. This interface abstracts from the Swing case and allows different implementations. In non-event-dispatch-aware clients (like web-clients) a trivial implementation for this interface exists.
| Method Summary | |
boolean |
isEventDispatchThread()
Returns true if the current thread is an AWT event
dispatching thread. |
java.lang.Object |
runInEventDispatchThread(ExceptionRunnable runnable)
Runs the given ExceptionRunnable in the event dispatch
thread. |
void |
runInEventDispatchThread(java.lang.Runnable runnable)
Runs the given Runnable in the event dispatch thread. |
void |
runLaterInEventDispatchThread(java.lang.Runnable runnable)
Causes runnable to have its run() method called in the event dispatch thread. |
void |
runLaterNotInEventDispatchThread(java.lang.Runnable runnable)
Causes runnable to have its run() method called outside the event dispatch thread. |
java.lang.Object |
runNotInEventDispatchThread(ExceptionRunnable runnable)
Runs the given ExceptionRunnable not in the event dispatch
thread. |
void |
runNotInEventDispatchThread(java.lang.Runnable runnable)
Runs the given Runnable not in the event dispatch thread. |
void |
runOrRunLaterInEventDispatchThread(java.lang.Runnable runnable)
Causes runnable to have its run() method called in the dispatch thread of the EventQueue. |
void |
waitForCondition(Condition condition)
Waits for the condition given without blocking event processing. |
| Method Detail |
public boolean isEventDispatchThread()
true if the current thread is an AWT event
dispatching thread.
public void waitForCondition(Condition condition)
throws java.lang.InterruptedException
Note: Implementation might wait on the object given.
condition - the Condition to wait for (until Condition.isFulfilled()
returns true)
java.lang.InterruptedException - if waiting was interruptedpublic void runLaterInEventDispatchThread(java.lang.Runnable runnable)
runnable - the Runnable whose run() method should be executedpublic void runLaterNotInEventDispatchThread(java.lang.Runnable runnable)
runnable - the Runnable whose run() method should be executed
public java.lang.Object runNotInEventDispatchThread(ExceptionRunnable runnable)
throws java.lang.Exception
ExceptionRunnable not in the event dispatch
thread.
runnable - the ExceptionRunnable to run
ExceptionRunnable.run()
java.lang.InterruptedException - if the executing thread was interrupted
java.lang.Exception - any exception thrown by the ExceptionRunnablepublic void runNotInEventDispatchThread(java.lang.Runnable runnable)
Runnable not in the event dispatch thread.
runnable - the Runnable to run
WrappedCheckedException - if a InterruptedException occured
public java.lang.Object runInEventDispatchThread(ExceptionRunnable runnable)
throws java.lang.Exception
ExceptionRunnable in the event dispatch
thread.
runnable - the ExceptionRunnable to run
ExceptionRunnable.run()
java.lang.InterruptedException - if the executing thread was interrupted
java.lang.Exception - any exception thrown by the ExceptionRunnablepublic void runInEventDispatchThread(java.lang.Runnable runnable)
Runnable in the event dispatch thread.
runnable - the Runnable to run
WrappedCheckedException - if a InterruptedException occuredpublic void runOrRunLaterInEventDispatchThread(java.lang.Runnable runnable)
Note: This method may or may not return before the runnable gets
executed within the EDT. In opposite to runLaterInEventDispatchThread(Runnable) it
calls the runnable faster (immediately), if called within the EDT.
runnable - the Runnable whose run() method should be executed
synchronously on the EventQueuerunLaterInEventDispatchThread(Runnable)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||