Class UIFSplitPane

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible

    public final class UIFSplitPane
    extends JSplitPane
    A JSplitPane subclass that can try to remove the divider border. Useful if the splitted components render their own borders. Note that this feature is not supported by all look&feels. Some look&feel implementation will always show a divider border, and conversely, others will never show a divider border.
    Version:
    $Revision$
    Author:
    Karsten Lentzsch
    See Also:
    BasicSplitPaneUI, Serialized Form
    • Constructor Detail

      • UIFSplitPane

        public UIFSplitPane()
        Constructs a UIFSplitPane configured to arrange the child components side-by-side horizontally with no continuous layout, using two buttons for the components.
      • UIFSplitPane

        public UIFSplitPane​(int newOrientation)
        Constructs a UIFSplitPane configured with the specified orientation and no continuous layout.
        Parameters:
        newOrientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
        Throws:
        IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT.
      • UIFSplitPane

        public UIFSplitPane​(int newOrientation,
                            boolean newContinuousLayout)
        Constructs a UIFSplitPane with the specified orientation and redrawing style.
        Parameters:
        newOrientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
        newContinuousLayout - a boolean, true for the components to redraw continuously as the divider changes position, false to wait until the divider position stops changing to redraw
        Throws:
        IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT
      • UIFSplitPane

        public UIFSplitPane​(int orientation,
                            Component leftComponent,
                            Component rightComponent)
        Constructs a UIFSplitPane with the specified orientation and the given componenents.
        Parameters:
        orientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
        leftComponent - the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane
        rightComponent - the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane
        Throws:
        IllegalArgumentException - if orientation is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT
      • UIFSplitPane

        public UIFSplitPane​(int orientation,
                            boolean continuousLayout,
                            Component leftComponent,
                            Component rightComponent)
        Constructs a UIFSplitPane with the specified orientation, redrawing style, and given components.
        Parameters:
        orientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
        continuousLayout - a boolean, true for the components to redraw continuously as the divider changes position, false to wait until the divider position stops changing to redraw
        leftComponent - the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane
        rightComponent - the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane
        Throws:
        IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT
    • Method Detail

      • createStrippedSplitPane

        public static UIFSplitPane createStrippedSplitPane​(int orientation,
                                                           Component leftComponent,
                                                           Component rightComponent)
        Constructs a UIFSplitPane, i.e. a JSplitPane that has no borders. Also disabled the one touch exandable property.
        Parameters:
        orientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT
        leftComponent - the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane
        rightComponent - the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane
        Returns:
        the constructed splitepane
        Throws:
        IllegalArgumentException - if orientation is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT
      • isDividerBorderVisible

        public boolean isDividerBorderVisible()
        Checks and answers whether the divider border shall be visible or invisible. Note that this feature is not supported by all look&feels. Some look&feel implementation will always show a divider border, and conversely, others will never show a divider border.
        Returns:
        the desired (but potentially inaccurate) divider border visiblity
      • setDividerBorderVisible

        public void setDividerBorderVisible​(boolean newVisibility)
        Makes the divider border visible or invisible. Note that this feature is not supported by all look&feels. Some look&feel implementation will always show a divider border, and conversely, others will never show a divider border.
        Parameters:
        newVisibility - true for visible, false for invisible
      • updateUI

        public void updateUI()
        Updates the UI and sets an empty divider border. The divider border may be restored by a L&F at UI installation time. And so, we try to reset it each time the UI is changed.
        Overrides:
        updateUI in class JSplitPane