Class MultiSplitLayout.Node
java.lang.Object
org.openstreetmap.josm.gui.widgets.MultiSplitLayout.Node
- Direct Known Subclasses:
MultiSplitLayout.Divider,MultiSplitLayout.Leaf,MultiSplitLayout.Split
- Enclosing class:
- MultiSplitLayout
Base class for the nodes that model a MultiSplitLayout.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the bounding Rectangle for this Node.Returns the Split parent of this Node, or null.doubleValue between 0.0 and 1.0 used to compute how much space to add to this sibling when the layout grows or how much to reduce when the layout shrinks.Return the Node that comes after this one in the parent's list of children, or null.Return the Node that comes before this one in the parent's list of children, or null.voidSet the bounding Rectangle for this node.voidsetParent(MultiSplitLayout.Split parent) Set the value of this Node's parent property.voidsetWeight(double weight) The weight property is a between 0.0 and 1.0 used to compute how much space to add to this sibling when the layout grows or how much to reduce when the layout shrinks.private MultiSplitLayout.NodesiblingAtOffset(int offset)
-
Field Details
-
parent
-
bounds
-
weight
-
-
Constructor Details
-
Node
protected Node()Constructs a newNode.
-
-
Method Details
-
getParent
Returns the Split parent of this Node, or null.This method isn't called getParent(), in order to avoid problems with recursive object creation when using XmlDecoder.
- Returns:
- the value of the parent property.
- See Also:
-
setParent
Set the value of this Node's parent property. The default value of this property is null.This method isn't called setParent(), in order to avoid problems with recursive object creation when using XmlEncoder.
- Parameters:
parent- a Split or null- See Also:
-
getBounds
Returns the bounding Rectangle for this Node.- Returns:
- the value of the bounds property.
- See Also:
-
setBounds
Set the bounding Rectangle for this node. The value of bounds may not be null. The default value of bounds is equal tonew Rectangle(0,0,0,0).- Parameters:
bounds- the new value of the bounds property- Throws:
IllegalArgumentException- if bounds is null- See Also:
-
getWeight
Value between 0.0 and 1.0 used to compute how much space to add to this sibling when the layout grows or how much to reduce when the layout shrinks.- Returns:
- the value of the weight property
- See Also:
-
setWeight
The weight property is a between 0.0 and 1.0 used to compute how much space to add to this sibling when the layout grows or how much to reduce when the layout shrinks. If rowLayout is true then this node's width grows or shrinks by (extraSpace * weight). If rowLayout is false, then the node's height is changed. The default value of weight is 0.0.- Parameters:
weight- a double between 0.0 and 1.0- Throws:
IllegalArgumentException- if weight is not between 0.0 and 1.0- See Also:
-
siblingAtOffset
-
nextSibling
Return the Node that comes after this one in the parent's list of children, or null. If this node's parent is null, or if it's the last child, then return null.- Returns:
- the Node that comes after this one in the parent's list of children.
- See Also:
-
previousSibling
Return the Node that comes before this one in the parent's list of children, or null. If this node's parent is null, or if it's the last child, then return null.- Returns:
- the Node that comes before this one in the parent's list of children.
- See Also:
-