Module is.codion.swing.common.model
Class SwingDispatcher
java.lang.Object
is.codion.swing.common.model.worker.SwingDispatcher
- All Implemented Interfaces:
Dispatcher
A
Dispatcher running tasks on the Event Dispatch Thread.-
Field Summary
Fields inherited from interface is.codion.common.model.worker.Dispatcher
SYNCHRONOUS -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SwingDispatcher
public SwingDispatcher()
-
-
Method Details
-
executor
Description copied from interface:DispatcherReturns an
Executorrunning tasks on the UI thread, resolved for the current context.Called when a
ProgressWorkeris executed, on the UI thread, so that context sensitive implementations, such as web frameworks providing a per-session UI thread, can bind to the current context.- Specified by:
executorin interfaceDispatcher- Returns:
- an
Executorrunning tasks on the UI thread
-
isUserInterfaceThread
public boolean isUserInterfaceThread()- Specified by:
isUserInterfaceThreadin interfaceDispatcher- Returns:
- true if the calling thread is the UI thread
-