Class DisplayRealm

java.lang.Object
org.eclipse.core.databinding.observable.Realm
org.eclipse.jface.databinding.swt.DisplayRealm

public class DisplayRealm extends Realm
This class is used to get a Realm for a certain Display.
Since:
1.7
  • Method Details

    • getRealm

      public static Realm getRealm(Display display)
      Returns the realm representing the UI thread for the given display.
      Parameters:
      display - the display to get realm for
      Returns:
      the realm representing the UI thread for the given display
    • isCurrent

      public boolean isCurrent()
      Specified by:
      isCurrent in class Realm
      Returns:
      true if the caller is executing in this realm. This method must not have side-effects (such as, for example, implicitly placing the caller in this realm).
    • asyncExec

      public void asyncExec(Runnable runnable)
      Description copied from class: Realm
      Causes the run() method of the runnable to be invoked from within this realm at the next reasonable opportunity. The caller of this method continues to run in parallel, and is not notified when the runnable has completed.

      If the given runnable is an instance of ISafeRunnable, its exception handler method will be called if any exceptions occur while running it. Otherwise, the exception will be logged.

      Subclasses should use Realm.safeRun(Runnable) to run the runnable.

      Overrides:
      asyncExec in class Realm
      Parameters:
      runnable - Runnable to execute
    • timerExec

      public void timerExec(int milliseconds, Runnable runnable)
      Description copied from class: Realm
      Causes the run() method of the runnable to be invoked from within this realm after the specified number of milliseconds have elapsed. If milliseconds is less than zero, the runnable is not executed. The caller of this method continues to run in parallel, and is not notified when the runnable has completed.

      If the given runnable is an instance of ISafeRunnable, its exception handler method will be called if any exceptions occur while running it. Otherwise, the exception will be logged.

      Subclasses should use Realm.safeRun(Runnable) to run the runnable.

      Overrides:
      timerExec in class Realm
      Parameters:
      milliseconds - wait time before executing the runnable
      runnable - Runnable to execute
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object