Package snap.view

Class ViewEnv

java.lang.Object
snap.view.ViewEnv
Direct Known Subclasses:
SwingViewEnv

public abstract class ViewEnv extends Object
An interface for platform specific UI functionality.
  • Field Details

    • _env

      protected static ViewEnv _env
  • Constructor Details

    • ViewEnv

      public ViewEnv()
  • Method Details

    • getEnv

      public static ViewEnv getEnv()
      Returns the node environment.
    • isEventThread

      public abstract boolean isEventThread()
      Returns whether current thread is event thread.
    • runLater

      public abstract void runLater(Runnable aRun)
      Run given runnable on event thread.
    • runLaterOnce

      public void runLaterOnce(Runnable aRun)
      Runs the given runnable once.
    • runLaterOnce

      public void runLaterOnce(String aName, Runnable aRun)
      Runs the given runnable for name once.
    • runDelayed

      public void runDelayed(Runnable aRun, int aDelay, boolean inAppThread)
      Runs given runnable after delay.
    • runIntervals

      public void runIntervals(Runnable aRun, int aPeriod, int aDelay, boolean doAll, boolean inAppThread)
      Runs given runnable for given period after given delay with option to run once for every interval, even under load.
    • stopIntervals

      public void stopIntervals(Runnable aRun)
      Runs given runnable for given period after given delay with option to run once for every interval, even under load.
    • runLaterAndWait

      public void runLaterAndWait(Runnable aRun)
      Runs an runnable later and waits for it to finish.
    • getUISource

      public WebURL getUISource(Class<?> aClass)
      Returns a UI source for given class.
    • getClipboard

      public Clipboard getClipboard()
      Returns the system clipboard.
    • getClipboardDrag

      public Clipboard getClipboardDrag()
      Returns the clipboard for dragging.
    • createHelper

      public WindowView.WindowHpr createHelper(View aView)
      Returns a ViewHelper for given native component.
    • createEvent

      public abstract ViewEvent createEvent(View aView, Object anEvent, ViewEvent.Type aType, String aName)
      Sends an event for a UI node.
    • getScreenBoundsInset

      public Rect getScreenBoundsInset()
      Returns the screen bounds inset to usable area.
    • activateApp

      public void activateApp(View aView)
      Activates the App giving focus to given node.
    • complain

      protected void complain(String s)