Class SplitWindow

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

    public class SplitWindow
    extends DockingWindow
    A window with a split pane that contains two child windows.
    See Also:
    Serialized Form
    • Constructor Detail

      • SplitWindow

        public SplitWindow​(boolean horizontal)
        Creates a split window.
        Parameters:
        horizontal - true if the split is horizontal
      • SplitWindow

        public SplitWindow​(boolean horizontal,
                           DockingWindow leftWindow,
                           DockingWindow rightWindow)
        Creates a split window with with the given child windows.
        Parameters:
        horizontal - true if the split is horizontal
        leftWindow - the left/upper window
        rightWindow - the right/lower window
      • SplitWindow

        public SplitWindow​(boolean horizontal,
                           float dividerLocation,
                           DockingWindow leftWindow,
                           DockingWindow rightWindow)
        Creates a split window with with the given child windows.
        Parameters:
        horizontal - true if the split is horizontal
        dividerLocation - the divider location, 0 - 1
        leftWindow - the left/upper window
        rightWindow - the right/lower window
    • Method Detail

      • getSplitWindowProperties

        public SplitWindowProperties getSplitWindowProperties()
        Returns the property values for this split window.
        Returns:
        the property values for this split window
      • getLeftWindow

        public DockingWindow getLeftWindow()
        Returns the left/upper child window.
        Returns:
        the left/upper child window
      • getRightWindow

        public DockingWindow getRightWindow()
        Returns the right/lower child window.
        Returns:
        the right/lower child window
      • setDividerLocation

        public void setDividerLocation​(float dividerLocation)
        Sets the divider location as a fraction of this split window's size.
        Parameters:
        dividerLocation - the divider location as a fraction of this split window's size
      • getDividerLocation

        public float getDividerLocation()
        Returns the divider location as a fraction of this split window's size.
        Returns:
        the divider location as a fraction of this split window's size
      • setWindows

        public void setWindows​(DockingWindow leftWindow,
                               DockingWindow rightWindow)
        Sets the child windows of this split window.
        Parameters:
        leftWindow - the left/upper child window
        rightWindow - the right/lower child window
      • isHorizontal

        public boolean isHorizontal()
        Returns true if this SplitWindow is a horizontal split, otherwise it's vertical.
        Returns:
        true if this SplitWindow is a horizontal split, otherwise it's vertical
        Since:
        IDW 1.2.0
      • setHorizontal

        public void setHorizontal​(boolean horizontal)
        Sets the split to horizontal or vertical.
        Parameters:
        horizontal - if true the split is set to horizontal, otherwise vertical
        Since:
        IDW 1.2.0
      • getChildWindow

        public DockingWindow getChildWindow​(int index)
        Description copied from class: DockingWindow
        Returns the child window with index index.
        Specified by:
        getChildWindow in class DockingWindow
        Parameters:
        index - the child window index
        Returns:
        the child window
      • getChildWindowCount

        public int getChildWindowCount()
        Description copied from class: DockingWindow
        Returns the number of child windows.
        Specified by:
        getChildWindowCount in class DockingWindow
        Returns:
        the number of child windows
      • getIcon

        public javax.swing.Icon getIcon()
        Description copied from class: DockingWindow
        Returns the icon for this window.
        Specified by:
        getIcon in class DockingWindow
        Returns:
        the icon
      • write

        protected void write​(java.io.ObjectOutputStream out,
                             WriteContext context,
                             ViewWriter viewWriter)
                      throws java.io.IOException
        Overrides:
        write in class DockingWindow
        Throws:
        java.io.IOException
      • newRead

        protected DockingWindow newRead​(java.io.ObjectInputStream in,
                                        ReadContext context,
                                        ViewReader viewReader)
                                 throws java.io.IOException
        Throws:
        java.io.IOException