Class VisionDesktop

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
FPMIApp

public abstract class VisionDesktop extends JDesktopPane
This is the custom JDesktopPane that makes up the the top level of the Vision client that manages all of the open windows. The primary desktop is a subclass of this class, called FPMIApp. Through scripting, additional desktops in separate JFrames may be opened.
See Also:
  • Field Details

    • PRIMARY_DESKTOP_HANDLE

      public static final String PRIMARY_DESKTOP_HANDLE
      See Also:
    • CURRENT_DESKTOP

      public static final ThreadLocal<String> CURRENT_DESKTOP
    • context

      protected final VisionClientContext context
    • windowController

      protected final WindowCache windowController
      The window controller stores the serialized code for each window, and is in charge of deserializing the windows.
    • activeWindow

      protected FPMIWindow activeWindow
    • selectedWindowTitle

      protected String selectedWindowTitle
  • Constructor Details

  • Method Details

    • initContext

      protected abstract VisionClientContext initContext(ClientContext clientContext)
    • getHandle

      public String getHandle()
    • shutdown

      protected void shutdown(boolean designer)
    • notifyWindowDeleted

      public void notifyWindowDeleted(ResourcePath id)
      Removes (permanently) the window of the specified name. All code for the window is deleted.
    • getAdapterContext

      public VisionClientContext getAdapterContext()
    • setWindowOpener

      public void setWindowOpener(WindowOpener windowOpener)
    • getWindowCache

      public WindowCache getWindowCache()
    • openWindow

      public RootPaneContainer openWindow(ResourcePath path)
    • openWindow

      public RootPaneContainer openWindow(String path)
      Opens, or brings to front, the window with name name.
      Parameters:
      path - the path of the window to open/select
      Returns:
      the window that was opened or selected.
    • openWindow

      public RootPaneContainer openWindow(String path, WindowInitializer initializer)
    • openWindow

      public RootPaneContainer openWindow(String path, WindowInitializer initializer, boolean openAdditional)
    • getWindow

      public FPMIWindow getWindow(String path)
      Returns the opened window of name name. If there is no open window with the given name, null is returned.
      Parameters:
      path - The path of the window to find
    • getPath

      public String getPath(FPMIWindow window)
    • getWindows

      public FPMIWindow[] getWindows(String path)
      Returns all opened windows with the given name. Returns an empty array if there are none.
    • getWindow

      public FPMIWindow getWindow(ResourcePath id)
      Returns the opened window with resource id id. If there is no open window with the given id, null is returned.
    • getWindows

      public FPMIWindow[] getWindows(ResourcePath id)
      Returns all opened windows with the given resource id. Returns an empty array if there are none.
    • getOpenedWindows

      public List<FPMIWindow> getOpenedWindows()
      Returns a List<FHMIWindow> of all open windows
    • getMinSize

      public Dimension getMinSize()
    • setMinSize

      public void setMinSize(Dimension minSize)
    • getScreenIndexSafe

      public int getScreenIndexSafe()
      Returns the index of the monitor the desktop is set to display on, or zero if the screen index falls outside of the available screens
    • setScreenIndex

      public void setScreenIndex(int screenIndex)
      Sets the index of the monitor the desktop is set to display on. Does not actually move the desktop to a display, nor does it check to ensure the index maps to an actual monitor. Used for record keeping.
    • setAxisPrecedence

      public void setAxisPrecedence(DockingDesktopManager.AxisPrecedence axisPrecedence)
    • getAxisPrecedence

      public DockingDesktopManager.AxisPrecedence getAxisPrecedence()
    • setRestrictFloatingFrames

      public void setRestrictFloatingFrames(boolean restrictFloatingFrames)
    • isRestrictFloatingFrames

      public boolean isRestrictFloatingFrames()
    • setInfiniteDesktop

      public void setInfiniteDesktop(boolean infiniteDesktop)
    • isInfiniteDesktop

      public boolean isInfiniteDesktop()
    • layoutDocks

      public void layoutDocks()
      This function verifies the layout of the docked windows, by checking to see if they are in the correct position, and moving/resizing them if necessary.
    • setBounds

      public void setBounds(int x, int y, int w, int h)
      Overrides:
      setBounds in class Component
    • addImpl

      protected void addImpl(Component frame, Object constraints, int layer)
      Overrides:
      addImpl in class JDesktopPane
    • remove

      public void remove(Component c)
      Overrides:
      remove in class JDesktopPane
    • setBackground

      public void setBackground(Color bg)
      Overrides:
      setBackground in class JComponent
    • addDesktopListener

      public void addDesktopListener(DesktopListener l)
    • removeDesktopListener

      public void removeDesktopListener(DesktopListener l)
    • fireWindowEvent

      protected void fireWindowEvent(FPMIWindow window, int eventType)
    • getSelectedWindowTitle

      public String getSelectedWindowTitle()
    • setSelectedWindowTitle

      public void setSelectedWindowTitle(String selectedWindowTitle)
    • getScriptManager

      public ScriptManager getScriptManager()