< prev index next >

src/java.desktop/share/classes/sun/awt/FwDispatcher.java

Print this page




  31  * An interface for the EventQueue delegate.
  32  * This class is added to support JavaFX/AWT interop single threaded mode
  33  * The delegate should be set in EventQueue by {@link EventQueue#setFwDispatcher(FwDispatcher)}
  34  * If the delegate is not null, than it handles supported methods instead of the
  35  * event queue. If it is null than the behaviour of an event queue does not change.
  36  *
  37  * @see EventQueue
  38  *
  39  * @author Petr Pchelko
  40  *
  41  * @since 1.8
  42  */
  43 public interface FwDispatcher {
  44     /**
  45      * Delegates the {@link EventQueue#isDispatchThread()} method
  46      */
  47     boolean isDispatchThread();
  48 
  49     /**
  50      * Forwards a runnable to the delegate, which executes it on an appropriate thread.
  51      * @param r - a runnable calling {@link EventQueue#dispatchEventImpl(java.awt.AWTEvent, Object)}
  52      */
  53     void scheduleDispatch(Runnable r);
  54 
  55     /**
  56      * Delegates the {@link java.awt.EventQueue#createSecondaryLoop()} method
  57      */
  58     SecondaryLoop createSecondaryLoop();
  59 }


  31  * An interface for the EventQueue delegate.
  32  * This class is added to support JavaFX/AWT interop single threaded mode
  33  * The delegate should be set in EventQueue by {@link EventQueue#setFwDispatcher(FwDispatcher)}
  34  * If the delegate is not null, than it handles supported methods instead of the
  35  * event queue. If it is null than the behaviour of an event queue does not change.
  36  *
  37  * @see EventQueue
  38  *
  39  * @author Petr Pchelko
  40  *
  41  * @since 1.8
  42  */
  43 public interface FwDispatcher {
  44     /**
  45      * Delegates the {@link EventQueue#isDispatchThread()} method
  46      */
  47     boolean isDispatchThread();
  48 
  49     /**
  50      * Forwards a runnable to the delegate, which executes it on an appropriate thread.
  51      * @param r  a runnable calling {@link EventQueue#dispatchEventImpl(java.awt.AWTEvent, Object)}
  52      */
  53     void scheduleDispatch(Runnable r);
  54 
  55     /**
  56      * Delegates the {@link java.awt.EventQueue#createSecondaryLoop()} method
  57      */
  58     SecondaryLoop createSecondaryLoop();
  59 }
< prev index next >