java.lang.Object
com.inductiveautomation.factorypmi.application.script.builtin.WindowUtilities
Direct Known Subclasses:
WindowUtilitiesForDesktop

public class WindowUtilities extends Object

These are the scripting functions mounted at system.gui.* Changes to this class must be made carefully, as some of the true implementations actually reside in the subclass, WindowUtilitiesForDesktop. Any method that is relative to a specific desktop needs to be implemented in the subclass, and then the version inside this class must delegate to that one using the WindowUtilites object returned by gui()

  • Field Details

  • Constructor Details

    • WindowUtilities

      public WindowUtilities(FPMIApp app)
  • Method Details

    • find

      public static WindowUtilities find(JComponent component)
      Finds the WindowUtilities for any component within the hierarchy of a Vision Window. Returns null if the Vision window hierarchy isn't present in the given component's ancestor tree.
    • desktop

      public WindowUtilities desktop()
    • desktop

      public WindowUtilities desktop(int screen)
    • desktop

      public WindowUtilities desktop(String handle)
    • createPopupContext

      public static WindowUtilities.PopupContext createPopupContext()
    • openDesktop

      public JFrame openDesktop(org.python.core.PyObject[] values, String[] keywords)
    • getCurrentDesktop

      public String getCurrentDesktop()
    • closeDesktop

      public void closeDesktop(String handle)
    • getDesktopHandles

      public org.python.core.PySequence getDesktopHandles()
    • moveComponent

      @Deprecated public static void moveComponent(JComponent comp, int x, int y)
      Deprecated.
    • resizeComponent

      @Deprecated public static void resizeComponent(JComponent comp, int w, int h)
      Deprecated.
    • reshapeComponent

      @Deprecated public static void reshapeComponent(JComponent comp, int x, int y, int w, int h)
      Deprecated.
    • transform

      public org.python.core.PyObject transform(org.python.core.PyObject[] values, String[] keywords)
    • chooseColor

      public Color chooseColor(Color initial)
    • chooseColor

      public Color chooseColor(Color initial, String title)
    • color

      public static Color color(String color)
    • color

      public static Color color(int r, int g, int b)
    • color

      public static Color color(int r, int g, int b, int alpha)
    • getSibling

      public static org.python.core.PyObject getSibling(EventObject event, String name)
    • getWindow

      public org.python.core.PyObject getWindow(String name)
    • getOpenedWindows

      public org.python.core.PyTuple getOpenedWindows()
    • getOpenedWindowNames

      public org.python.core.PyTuple getOpenedWindowNames()
    • getWindowNames

      public org.python.core.PyTuple getWindowNames()
    • findWindow

      public List<PyComponentWrapper> findWindow(String path)
      Searches through the open windows for windows with the given path. May return none (empty list) or multiple depending on the state of the running client.
    • getParentWindow

      public static org.python.core.PyObject getParentWindow(EventObject event)
    • errorBox

      public void errorBox(String message)
    • errorBox

      public void errorBox(String message, String title)
    • warningBox

      public void warningBox(String message)
    • warningBox

      public void warningBox(String message, String title)
    • messageBox

      public void messageBox(String message)
    • messageBox

      public void messageBox(String message, String title)
    • confirm

      public Boolean confirm(String message)
    • confirm

      public Boolean confirm(String message, String title)
    • confirm

      public Boolean confirm(String message, String title, Boolean allowCancel)
    • inputBox

      public String inputBox(String message)
    • inputBox

      public String inputBox(String message, String defaultTxt)
    • passwordBox

      public String passwordBox(String message)
    • passwordBox

      public String passwordBox(String message, String title)
    • passwordBox

      public String passwordBox(String message, String title, String echoChar)
    • showNumericKeypad

      public Number showNumericKeypad(Number initial)
    • showNumericKeypad

      public Number showNumericKeypad(Number initial, int fontSize)
    • showNumericKeypad

      public Number showNumericKeypad(Number initial, int fontSize, boolean usePasswordMode)
    • showTouchscreenKeyboard

      public String showTouchscreenKeyboard(String initial)
    • showTouchscreenKeyboard

      public String showTouchscreenKeyboard(String initial, int fontSize)
    • showTouchscreenKeyboard

      public String showTouchscreenKeyboard(String initial, int fontSize, boolean password)
    • showTouchscreenKeyboard

      public String showTouchscreenKeyboard(String initial, int fontSize, boolean password, String layout)
    • showTouchscreenKeyboard

      public String showTouchscreenKeyboard(org.python.core.PyObject[] args, String[] keywords)
    • isTouchscreenMode

      @Deprecated public static boolean isTouchscreenMode()
      Deprecated.
    • isTouchscreenModeEnabled

      public boolean isTouchscreenModeEnabled()
    • setTouchscreenMode

      @Deprecated public void setTouchscreenMode(boolean b)
      Deprecated.
    • setTouchscreenModeEnabled

      public void setTouchscreenModeEnabled(boolean b)
    • convertPointToScreen

      public static org.python.core.PyTuple convertPointToScreen(int x, int y, EventObject event)
    • createPopupMenu

      @Deprecated public static JPopupMenu createPopupMenu(org.python.core.PyDictionary dict)
      Deprecated.
    • createPopupMenu

      public static JPopupMenu createPopupMenu(org.python.core.PySequence keys, org.python.core.PySequence functions)
    • setScreenIndex

      public void setScreenIndex(int index)
    • getScreenIndex

      public int getScreenIndex()
    • getQuality

      public QualityCode getQuality(JComponent comp, String propertyName)
    • getScreens

      public static org.python.core.PySequence getScreens()
    • openDiagnostics

      public void openDiagnostics()