Class DockingDesktopManager

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.DesktopManager

    public class DockingDesktopManager
    extends javax.swing.DefaultDesktopManager
    The scrolling portion of this class borrowed from JavaWorld See http://www.javaworld.com/javaworld/jw-05-2001/jw-0525-mdi.html
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activateFrame​(javax.swing.JInternalFrame f)  
      void beginDraggingFrame​(javax.swing.JComponent f)  
      void beginResizingFrame​(javax.swing.JComponent f, int direction)  
      void centerFrame​(javax.swing.JInternalFrame frame)  
      void closeFrame​(javax.swing.JInternalFrame f)  
      void dragFrame​(javax.swing.JComponent f, int newX, int newY)  
      void endDraggingFrame​(javax.swing.JComponent f)  
      void endResizingFrame​(javax.swing.JComponent f)  
      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.
      void maximizeFrame​(javax.swing.JInternalFrame f)  
      void minimizeFrame​(javax.swing.JInternalFrame f)
      Restores the frame back to its size and position prior to a maximizeFrame call.
      void resizeDesktop()
      Evaluates what the size of the desktop pane should be given the currently opened windows, and sets it to that size.
      void resizeFrame​(javax.swing.JComponent f, int newX, int newY, int newWidth, int newHeight)  
      void setBoundsForFrame​(javax.swing.JComponent f, int newX, int newY, int newWidth, int newHeight)
      Sets the size for the frame, and calls f.revalidate() if the size changed.
      • Methods inherited from class javax.swing.DefaultDesktopManager

        deactivateFrame, deiconifyFrame, getBoundsForIconOf, getPreviousBounds, iconifyFrame, openFrame, removeIconFor, setPreviousBounds, setWasIcon, wasIcon
      • Methods inherited from class java.lang.Object

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

      • DockingDesktopManager

        public DockingDesktopManager​(VisionDesktop desktop)
    • Method Detail

      • endResizingFrame

        public void endResizingFrame​(javax.swing.JComponent f)
        Specified by:
        endResizingFrame in interface javax.swing.DesktopManager
        Overrides:
        endResizingFrame in class javax.swing.DefaultDesktopManager
      • endDraggingFrame

        public void endDraggingFrame​(javax.swing.JComponent f)
        Specified by:
        endDraggingFrame in interface javax.swing.DesktopManager
        Overrides:
        endDraggingFrame in class javax.swing.DefaultDesktopManager
      • centerFrame

        public void centerFrame​(javax.swing.JInternalFrame frame)
      • 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.

        It first lays out the EAST and WEST docked windows, if any, then it lays out the NORTH and SOUTH docked windows in the resulting width. Finally, maximized windows are laid-out.

      • resizeDesktop

        public void resizeDesktop()
        Evaluates what the size of the desktop pane should be given the currently opened windows, and sets it to that size.
      • resizeFrame

        public void resizeFrame​(javax.swing.JComponent f,
                                int newX,
                                int newY,
                                int newWidth,
                                int newHeight)
        Specified by:
        resizeFrame in interface javax.swing.DesktopManager
        Overrides:
        resizeFrame in class javax.swing.DefaultDesktopManager
      • setBoundsForFrame

        public void setBoundsForFrame​(javax.swing.JComponent f,
                                      int newX,
                                      int newY,
                                      int newWidth,
                                      int newHeight)
        Sets the size for the frame, and calls f.revalidate() if the size changed.
        Specified by:
        setBoundsForFrame in interface javax.swing.DesktopManager
        Overrides:
        setBoundsForFrame in class javax.swing.DefaultDesktopManager
      • dragFrame

        public void dragFrame​(javax.swing.JComponent f,
                              int newX,
                              int newY)
        Specified by:
        dragFrame in interface javax.swing.DesktopManager
        Overrides:
        dragFrame in class javax.swing.DefaultDesktopManager
      • beginDraggingFrame

        public void beginDraggingFrame​(javax.swing.JComponent f)
        Specified by:
        beginDraggingFrame in interface javax.swing.DesktopManager
        Overrides:
        beginDraggingFrame in class javax.swing.DefaultDesktopManager
      • beginResizingFrame

        public void beginResizingFrame​(javax.swing.JComponent f,
                                       int direction)
        Specified by:
        beginResizingFrame in interface javax.swing.DesktopManager
        Overrides:
        beginResizingFrame in class javax.swing.DefaultDesktopManager
      • closeFrame

        public void closeFrame​(javax.swing.JInternalFrame f)
        Specified by:
        closeFrame in interface javax.swing.DesktopManager
        Overrides:
        closeFrame in class javax.swing.DefaultDesktopManager
      • minimizeFrame

        public void minimizeFrame​(javax.swing.JInternalFrame f)
        Restores the frame back to its size and position prior to a maximizeFrame call.
        Specified by:
        minimizeFrame in interface javax.swing.DesktopManager
        Overrides:
        minimizeFrame in class javax.swing.DefaultDesktopManager
        Parameters:
        f - the JInternalFrame to be restored
      • maximizeFrame

        public void maximizeFrame​(javax.swing.JInternalFrame f)
        Specified by:
        maximizeFrame in interface javax.swing.DesktopManager
        Overrides:
        maximizeFrame in class javax.swing.DefaultDesktopManager
      • activateFrame

        public void activateFrame​(javax.swing.JInternalFrame f)
        Specified by:
        activateFrame in interface javax.swing.DesktopManager
        Overrides:
        activateFrame in class javax.swing.DefaultDesktopManager