Class UISynchronize


  • public abstract class UISynchronize
    extends java.lang.Object
    Widget toolkit abstract to synchronize back into the UI-Thread from other threads
    Since:
    1.0
    Restriction:
    This class is not intended to be subclassed by clients.
    • Constructor Summary

      Constructors 
      Constructor Description
      UISynchronize()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void asyncExec​(java.lang.Runnable runnable)
      Schedules the runnable on the UI-Thread for execution and returns immediately
      protected abstract boolean dispatchEvents()
      Request to perform an event dispatch cycle.
      protected abstract boolean isUIThread​(java.lang.Thread thread)
      Checks if the given thread is the UI-Thread.
      protected abstract void showBusyWhile​(java.lang.Runnable runnable)
      Shows a busy-indicator to the user while this runnable is executed, long running operations in the UI thread may freeze the UI.
      abstract void syncExec​(java.lang.Runnable runnable)
      Executes the runnable on the UI-Thread and blocks until the runnable is finished
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UISynchronize

        public UISynchronize()
    • Method Detail

      • syncExec

        public abstract void syncExec​(java.lang.Runnable runnable)
        Executes the runnable on the UI-Thread and blocks until the runnable is finished
        Parameters:
        runnable - the runnable to execute
      • asyncExec

        public abstract void asyncExec​(java.lang.Runnable runnable)
        Schedules the runnable on the UI-Thread for execution and returns immediately
        Parameters:
        runnable - the runnable to execute
      • isUIThread

        protected abstract boolean isUIThread​(java.lang.Thread thread)
        Checks if the given thread is the UI-Thread.
        Parameters:
        thread - to check
        Returns:
        true if the thread is the UI-Thread false otherwise
        Since:
        1.3
      • showBusyWhile

        protected abstract void showBusyWhile​(java.lang.Runnable runnable)
        Shows a busy-indicator to the user while this runnable is executed, long running operations in the UI thread may freeze the UI.
        Parameters:
        runnable - the runnable to execute
        Since:
        1.3
      • dispatchEvents

        protected abstract boolean dispatchEvents()
        Request to perform an event dispatch cycle.
        Returns:
        true if there might be more work to perform false otherwise
        Since:
        1.3