Class SwingDispatcher

java.lang.Object
is.codion.swing.common.model.worker.SwingDispatcher
All Implemented Interfaces:
Dispatcher

public final class SwingDispatcher extends Object implements Dispatcher
A Dispatcher running tasks on the Event Dispatch Thread.
  • Constructor Details

    • SwingDispatcher

      public SwingDispatcher()
  • Method Details

    • executor

      public Executor executor()
      Description copied from interface: Dispatcher

      Returns an Executor running tasks on the UI thread, resolved for the current context.

      Called when a ProgressWorker is 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:
      executor in interface Dispatcher
      Returns:
      an Executor running tasks on the UI thread
    • isUserInterfaceThread

      public boolean isUserInterfaceThread()
      Specified by:
      isUserInterfaceThread in interface Dispatcher
      Returns:
      true if the calling thread is the UI thread