GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.common.util.awt.AWTEDTExecutor Class Reference

AWT EDT implementation of RunnableExecutor. More...

Inheritance diagram for com.jogamp.common.util.awt.AWTEDTExecutor:
Collaboration diagram for com.jogamp.common.util.awt.AWTEDTExecutor:

Public Member Functions

void invoke (final boolean wait, final Runnable r)
 
boolean invoke (final Object treeLock, final boolean allowOnNonEDT, final boolean wait, final Runnable r)
 Executes the given runnable on the AWT-EDT and return true, if. More...
 
void invoke (boolean wait, Runnable r)
 

Static Public Attributes

static final AWTEDTExecutor singleton = new AWTEDTExecutor()
 RunnableExecutor implementation invoking Runnable#run() on the AWT EDT. More...
 
- Static Public Attributes inherited from com.jogamp.common.util.RunnableExecutor
static final RunnableExecutor currentThreadExecutor = new CurrentThreadExecutor()
 This RunnableExecutor implementation simply invokes Runnable#run() on the current thread. More...
 

Detailed Description

AWT EDT implementation of RunnableExecutor.

Definition at line 38 of file AWTEDTExecutor.java.

Member Function Documentation

◆ invoke() [1/2]

void com.jogamp.common.util.awt.AWTEDTExecutor.invoke ( final boolean  wait,
final Runnable  r 
)
Parameters
waitif true method waits until Runnable#run() is completed, otherwise don't wait.
rthe Runnable to be executed.

Implements com.jogamp.common.util.RunnableExecutor.

Definition at line 47 of file AWTEDTExecutor.java.

◆ invoke() [2/2]

boolean com.jogamp.common.util.awt.AWTEDTExecutor.invoke ( final Object  treeLock,
final boolean  allowOnNonEDT,
final boolean  wait,
final Runnable  r 
)

Executes the given runnable on the AWT-EDT and return true, 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, if allowOnNonEDT is true.
This implies that the given tree-lock is being hold by the current-thread.

Otherwise the runnable is not executed and false is returned.

Parameters
treeLockrepresenting the AWT-tree-lock, i.e. java.awt.Component#getTreeLock()
allowOnNonEDTallow execution on non AWT-EDT in case current thread is not AWT-EDT and the tree-lock is being hold
waitif true method waits until Runnable#run() is completed, otherwise don't wait.
rthe Runnable to be executed.
Returns
true if the Runnable has been issued for execution, otherwise false

Definition at line 86 of file AWTEDTExecutor.java.

Member Data Documentation

◆ singleton

final AWTEDTExecutor com.jogamp.common.util.awt.AWTEDTExecutor.singleton = new AWTEDTExecutor()
static

RunnableExecutor implementation invoking Runnable#run() on the AWT EDT.

Definition at line 42 of file AWTEDTExecutor.java.


The documentation for this class was generated from the following file: