Class SplitPane

  • All Implemented Interfaces:
    java.lang.Iterable<Component>, Sequence<Component>, ConstrainedVisual, Visual

    public class SplitPane
    extends Container
    A SplitPane is a container component that splits its size up into two regions, each of which is capable of holding one component. A split pane may be setup to support either horizontal or veritcal splits. The area in between the two regions is known as the splitter and typically allows the user to adjust the partitioning between the two regions.

    Since SplitPanes only support a single splitter, multiple SplitPanes may be nested to support more complex layouts. In that case, one split pane will "own" the other. The implication of this is noticed when a split pane directly contains a child split pane of the same orientation. The parent pane's separator will be able to travel past that of it's child, but the child's separator will be unable to pass the parent's.

    • Method Detail

      • setTopLeft

        public void setTopLeft​(Component topLeft)
      • getBottomRight

        public Component getBottomRight()
      • setBottomRight

        public void setBottomRight​(Component bottomRight)
      • getTop

        public Component getTop()
        Returns:
        The "top" component of the split pane, which only applies in vertical mode; otherwise it is null.
      • setTop

        public void setTop​(Component component)
      • getBottom

        public Component getBottom()
        Returns:
        The "bottom" component of the split pane, which only applies in vertical mode; otherwise it is null.
      • setBottom

        public void setBottom​(Component component)
      • getLeft

        public Component getLeft()
        Returns:
        The "left" component of the split pane, which only applies in horizontal mode; otherwise it is null.
      • setLeft

        public void setLeft​(Component component)
      • getRight

        public Component getRight()
        Returns:
        The "right" component of the split pane, which only applies in horizontal mode; otherwise it is null.
      • setRight

        public void setRight​(Component component)
      • setOrientation

        public void setOrientation​(Orientation orientation)
      • setPrimaryRegion

        public void setPrimaryRegion​(SplitPane.Region primaryRegion)
      • getSplitRatio

        public float getSplitRatio()
      • setSplitRatio

        public void setSplitRatio​(float splitRatio)
      • isLocked

        public boolean isLocked()
      • setLocked

        public void setLocked​(boolean locked)
      • remove

        public Sequence<Component> remove​(int index,
                                          int count)
        Description copied from interface: Sequence
        Removes one or more items from the sequence.
        Specified by:
        remove in interface Sequence<Component>
        Overrides:
        remove in class Container
        Parameters:
        index - The starting index to remove.
        count - The number of items to remove, beginning with index.
        Returns:
        A sequence containing the items that were removed.