Package com.jogamp.common.util.awt
Class AWTEDTExecutor
java.lang.Object
com.jogamp.common.util.awt.AWTEDTExecutor
- All Implemented Interfaces:
RunnableExecutor
AWT EDT implementation of RunnableExecutor
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jogamp.common.util.RunnableExecutor
RunnableExecutor.CurrentThreadExecutor -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AWTEDTExecutorRunnableExecutorimplementation invokingRunnable.run()on the AWT EDT.Fields inherited from interface com.jogamp.common.util.RunnableExecutor
currentThreadExecutor -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanExecutes the given runnable on the AWT-EDT and returntrue, if current-thread is the AWT-EDT, or the given tree-lock is not hold by current-thread (-> invoke on AWT-EDT)
-
Field Details
-
singleton
RunnableExecutorimplementation invokingRunnable.run()on the AWT EDT.
-
-
Method Details
-
invoke
- Specified by:
invokein interfaceRunnableExecutor- Parameters:
wait- if true method waits untilRunnable.run()is completed, otherwise don't wait.r- theRunnableto be executed.
-
invoke
Executes the given runnable on the AWT-EDT and returntrue, if- current-thread is the AWT-EDT, or
- the given tree-lock is not hold by current-thread (-> invoke on AWT-EDT)
Otherwise execute the given runnable on the current-thread and return
true, ifallowOnNonEDTistrue.
This implies that the given tree-lock is being hold by the current-thread.Otherwise the runnable is not executed and
falseis returned.- Parameters:
treeLock- representing the AWT-tree-lock, i.e.Component.getTreeLock()allowOnNonEDT- allow execution on non AWT-EDT in case current thread is not AWT-EDT and the tree-lock is being holdwait- if true method waits untilRunnable.run()is completed, otherwise don't wait.r- theRunnableto be executed.- Returns:
trueif theRunnablehas been issued for execution, otherwisefalse
-