Class SplitPanelWithOptionalComponents

    • Field Detail

      • m_SplitPane

        protected BaseSplitPane m_SplitPane
        the split pane.
      • m_LeftDetachablePanel

        protected DetachablePanel m_LeftDetachablePanel
        the detachable panel for the left component.
      • m_LeftComponent

        protected JComponent m_LeftComponent
        the left component.
      • m_RightDetachablePanel

        protected DetachablePanel m_RightDetachablePanel
        the detachable panel for the right component.
      • m_RightComponent

        protected JComponent m_RightComponent
        the right component.
      • m_Orientation

        protected int m_Orientation
        the orientation.
      • m_LeftDetachable

        protected boolean m_LeftDetachable
        whether the left component is detachable.
      • m_RightDetachable

        protected boolean m_RightDetachable
        whether the right component is detachable.
      • m_LeftDetachableButtonVisible

        protected boolean m_LeftDetachableButtonVisible
        whether a button to detach left component is visible.
      • m_RightDetachableButtonVisible

        protected boolean m_RightDetachableButtonVisible
        whether a button to detach right component is visible.
    • Constructor Detail

      • SplitPanelWithOptionalComponents

        public SplitPanelWithOptionalComponents()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        Initializes the members.
        Overrides:
        initGUI in class BasePanel
      • finishInit

        protected void finishInit()
        Finishes the initialization.
        Overrides:
        finishInit in class BasePanel
      • setUISettingsParameters

        public void setUISettingsParameters​(Class cls)
        Sets the class to use for the UI settings.
        Parameters:
        cls - the class to use
      • setLeftComponent

        public void setLeftComponent​(JPanel value)
        Sets the left component.
        Parameters:
        value - the left component, null to remove
      • getLeftComponent

        public JComponent getLeftComponent()
        Returns the left component.
        Returns:
        the left component, can be null
      • removeLeftComponent

        public void removeLeftComponent()
        Removes the left component.
      • setRightComponent

        public void setRightComponent​(JComponent value)
        Sets the right component.
        Parameters:
        value - the right component, null to remove
      • getRightComponent

        public JComponent getRightComponent()
        Returns the right component.
        Returns:
        the right component, can be null
      • removeRightComponent

        public void removeRightComponent()
        Removes the right component.
      • setTopComponent

        public void setTopComponent​(JPanel value)
        Sets the top component.
        Parameters:
        value - the top component, can be null
      • getTopComponent

        public JComponent getTopComponent()
        Returns the top component.
        Returns:
        the top component, can be null
      • removeTopComponent

        public void removeTopComponent()
        Removes the top component.
      • setBottomComponent

        public void setBottomComponent​(JComponent value)
        Sets the bottom component.
        Parameters:
        value - the bottom component, null to use empty panel
      • getBottomComponent

        public JComponent getBottomComponent()
        Returns the bottom component.
        Returns:
        the bottom component
      • removeBottomComponent

        public void removeBottomComponent()
        Removes the bottom component.
      • setLeftDetachable

        public void setLeftDetachable​(boolean value)
        Sets whether the left component is detachable.
        Parameters:
        value - true if to be detachable
      • isLeftDetachable

        public boolean isLeftDetachable()
        Returns whether the left component is detachable.
        Returns:
        true if detachable
      • setRightDetachable

        public void setRightDetachable​(boolean value)
        Sets whether the right component is detachable.
        Parameters:
        value - true if to be detachable
      • isRightDetachable

        public boolean isRightDetachable()
        Returns whether the right component is detachable.
        Returns:
        true if detachable
      • setTopDetachable

        public void setTopDetachable​(boolean value)
        Sets whether the top component is detachable.
        Parameters:
        value - true if to be detachable
      • isTopDetachable

        public boolean isTopDetachable()
        Returns whether the top component is detachable.
        Returns:
        true if detachable
      • setBottomDetachable

        public void setBottomDetachable​(boolean value)
        Sets whether the bottom component is detachable.
        Parameters:
        value - true if to be detachable
      • isBottomDetachable

        public boolean isBottomDetachable()
        Returns whether the bottom component is detachable.
        Returns:
        true if detachable
      • setLeftDetachedFrameTitle

        public void setLeftDetachedFrameTitle​(String value)
        Sets the frame title for the detached left component.
        Parameters:
        value - the title
      • getLeftDetachedFrameTitle

        public String getLeftDetachedFrameTitle()
        Returns the frame title for the detached left component.
        Returns:
        the title
      • setRightDetachedFrameTitle

        public void setRightDetachedFrameTitle​(String value)
        Sets the frame title for the detached right component.
        Parameters:
        value - the title
      • getRightDetachedFrameTitle

        public String getRightDetachedFrameTitle()
        Returns the frame title for the detached right component.
        Returns:
        the title
      • setLeftDetachableButtonVisible

        public void setLeftDetachableButtonVisible​(boolean value)
        Sets whether the button to detach the left component is visible.
        Parameters:
        value - true if visible
      • isLeftDetachableButtonVisible

        public boolean isLeftDetachableButtonVisible()
        Returns the frame title for the detached left component.
        Returns:
        true if visible
      • setRightDetachableButtonVisible

        public void setRightDetachableButtonVisible​(boolean value)
        Sets whether the button to detach the right component is visible.
        Parameters:
        value - true if visible
      • isRightDetachableButtonVisible

        public boolean isRightDetachableButtonVisible()
        Returns the frame title for the detached right component.
        Returns:
        true if visible
      • setTopDetachableButtonVisible

        public void setTopDetachableButtonVisible​(boolean value)
        Sets whether the button to detach the top component is visible.
        Parameters:
        value - true if visible
      • isTopDetachableButtonVisible

        public boolean isTopDetachableButtonVisible()
        Returns the frame title for the detached top component.
        Returns:
        true if visible
      • setBottomDetachableButtonVisible

        public void setBottomDetachableButtonVisible​(boolean value)
        Sets whether the button to detach the bottom component is visible.
        Parameters:
        value - true if visible
      • isBottomDetachableButtonVisible

        public boolean isBottomDetachableButtonVisible()
        Returns the frame title for the detached bottom component.
        Returns:
        true if visible
      • setDividerLocation

        public void setDividerLocation​(int location)
        Return the divider location.
        Parameters:
        location - the divider location
      • getDividerLocation

        public int getDividerLocation()
        Return the divider location.
        Returns:
        the divider location
      • setResizeWeight

        public void setResizeWeight​(double value)
        Specifies how to distribute extra space when the size of the split pane changes. A value of 0, the default, indicates the right/bottom component gets all the extra space (the left/top component acts fixed), where as a value of 1 specifies the left/top component gets all the extra space (the right/bottom component acts fixed). Specifically, the left/top component gets (weight * diff) extra space and the right/bottom component gets (1 - weight) * diff extra space.
        Parameters:
        value - as described above
        Throws:
        IllegalArgumentException - if value is < 0 or > 1
      • getResizeWeight

        public double getResizeWeight()
        Returns the number that determines how extra space is distributed.
        Returns:
        how extra space is to be distributed on a resize of the split pane
      • makeDetachableIfNecessary

        protected JComponent makeDetachableIfNecessary​(JComponent component,
                                                       boolean left)
        Wraps the component in a detachable panel, if necessary.
        Parameters:
        component - the component to wrap
        left - whether left or right component
        Returns:
        the (potentially) wrapped component
      • update

        protected void update()
        Updates the layout.
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler