org.jdesktop.swingx
Class MultiSplitLayout.Split

java.lang.Object
  extended by org.jdesktop.swingx.MultiSplitLayout.Node
      extended by 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(MultiSplitLayout.Node... children)
           
 
Method Summary
 List<MultiSplitLayout.Node> getChildren()
          Returns this Split node's children.
 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.
 MultiSplitLayout.Node lastWeightedChild()
          Convenience method that returns the last child whose weight is > 0.0.
 void setChildren(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 setRowLayout(boolean rowLayout)
          Set the rowLayout property.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.jdesktop.swingx.MultiSplitLayout.Node
getBounds, getParent, getWeight, nextSibling, previousSibling, setBounds, setParent, 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)
Method Detail

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 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)

setChildren

public void setChildren(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:
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:
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()

toString

public String toString()
Description copied from class: java.lang.Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Object
Returns:
a string representation of the object.