Class MultiSplitLayout.Split

    • Constructor Detail

      • Split

        public Split()
        Default constructor to support xml (de)serialization and other bean spec dependent ops. Resulting instance of Split is invalid until setChildren() is called.
    • Method Detail

      • isVisible

        public boolean isVisible()
        Determines whether this node should be visible when its parent is visible. Nodes are initially visible
        Overrides:
        isVisible in class MultiSplitLayout.Node
        Returns:
        true if the node is visible, false otherwise
      • isRowLayout

        public boolean isRowLayout()
        Returns true if the this Split's children are to be laid out in a row: all the same height, left edge equal to the previous Node's right edge. If false, children are laid on in a column.
        Returns:
        the value of the rowLayout property.
        See Also:
        setRowLayout(boolean)
      • setRowLayout

        public void setRowLayout​(boolean rowLayout)
        Set the rowLayout property. If true, all of this Split's children are to be laid out in a row: all the same height, each node's left edge equal to the previous Node's right edge. If false, children are laid on in a column. Default value is true.
        Parameters:
        rowLayout - true for horizontal row layout, false for column
        See Also:
        isRowLayout()
      • remove

        public void remove​(MultiSplitLayout.Node n)
        Remove a node from the layout. Any sibling dividers will also be removed
        Parameters:
        n - the node to be removed
      • replace

        public void replace​(MultiSplitLayout.Node target,
                            MultiSplitLayout.Node replacement)
        Replace one node with another. This method is used when a child is removed from a split and the split is no longer required, in which case the remaining node in the child split can replace the split in the parent node
        Parameters:
        target - the node being replaced
        replacement - the replacement node
      • hide

        public void hide​(MultiSplitLayout.Node target)
        Change a node to being hidden. Any associated divider nodes are also hidden
        Parameters:
        target - the node to hide
      • checkDividers

        public void checkDividers​(MultiSplitLayout.Split split)
        Check the dividers to ensure that redundant dividers are hidden and do not interfere in the layout, for example when all the children of a split are hidden (the split is then invisible), so two dividers may otherwise appear next to one another.
        Parameters:
        split - the split to check
      • restoreDividers

        public void restoreDividers​(MultiSplitLayout.Split split)
        Restore any of the hidden dividers that are required to separate visible nodes
        Parameters:
        split - the node to check
      • setChildren

        public void setChildren​(java.util.List<MultiSplitLayout.Node> children)
        Set's the children property of this Split node. The parent of each new child is set to this Split node, and the parent of each old child (if any) is set to null. This method defensively copies the incoming List. Default value is an empty List.
        Parameters:
        children - List of children
        Throws:
        java.lang.IllegalArgumentException - if children is null
        See Also:
        getChildren()
      • setChildren

        public void setChildren​(MultiSplitLayout.Node... children)
        Convenience method for setting the children of this Split node. The parent of each new child is set to this Split node, and the parent of each old child (if any) is set to null. This method defensively copies the incoming array.
        Parameters:
        children - array of children
        Throws:
        java.lang.IllegalArgumentException - if children is null
        See Also:
        getChildren()
      • getName

        public java.lang.String getName()
        Return the Leaf's name.
        Returns:
        the value of the name property.
        See Also:
        setName(java.lang.String)
      • setName

        public void setName​(java.lang.String name)
        Set the value of the name property. Name may not be null.
        Parameters:
        name - value of the name property
        Throws:
        java.lang.IllegalArgumentException - if name is null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object