Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.swingx
Class MultiSplitLayout.Split

    java.lang.Object
      org.jdesktop.swingx.MultiSplitLayout.Node
          org.jdesktop.swingx.MultiSplitLayout.Split

Direct Known Subclasses:
  DefaultSplitPaneModel, MultiSplitLayout.ColSplit, MultiSplitLayout.RowSplit

Enclosing class:
  MultiSplitLayout

    public static class MultiSplitLayout.Split

extends MultiSplitLayout.Node

Defines a vertical or horizontal subdivision into two or more tiles.

Constructor Summary
`MultiSplitLayout.Split()` Default constructor to support xml (de)serialization and other bean spec dependent ops.
`MultiSplitLayout.Split(MultiSplitLayout.Node... children)`

Method Summary
`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.
`java.util.List<MultiSplitLayout.Node>` | `getChildren()` Returns this Split node's children.
`java.lang.String` | `getName()` Return the Leaf's name.
`void` | `hide(MultiSplitLayout.Node target)` Change a node to being hidden.
`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.
`boolean` | `isVisible()` Determines whether this node should be visible when its parent is visible.
`MultiSplitLayout.Node` | `lastWeightedChild()` Convenience method that returns the last child whose weight is > 0.0.
`void` | `remove(MultiSplitLayout.Node n)` Remove a node from the layout.
`void` | `replace(MultiSplitLayout.Node target, MultiSplitLayout.Node replacement)` Replace one node with another.
`void` | `restoreDividers(MultiSplitLayout.Split split)` Restore any of the hidden dividers that are required to separate visible nodes
`void` | `setChildren(java.util.List<MultiSplitLayout.Node> children)` Set's the children property of this Split node.
`void` | `setChildren(MultiSplitLayout.Node... children)` Convenience method for setting the children of this Split node.
`void` | `setName(java.lang.String name)` Set the value of the name property.
`void` | `setRowLayout(boolean rowLayout)` Set the rowLayout property.
`java.lang.String` | `toString()`

Methods inherited from class org.jdesktop.swingx.MultiSplitLayout.Node
`getBounds, getParent, getWeight, nextSibling, previousSibling, setBounds, setParent, setVisible, setWeight`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MultiSplitLayout.Split

    public MultiSplitLayout.Split(MultiSplitLayout.Node... children)

### MultiSplitLayout.Split

    public MultiSplitLayout.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()`

### getChildren

    public java.util.List<MultiSplitLayout.Node> getChildren()

  Returns this Split node's children. The returned value is not a reference to the Split's internal list of children

  Returns:
    the value of the children property.
  See Also:
    `setChildren(java.util.List)`

### 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()`

### lastWeightedChild

    public final MultiSplitLayout.Node lastWeightedChild()

  Convenience method that returns the last child whose weight is > 0.0.

  Returns:
    the last child whose weight is > 0.0.
  See Also:
    `getChildren()`, `MultiSplitLayout.Node.getWeight()`

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.