org.openstreetmap.josm.gui
Class MultiSplitLayout.Node

java.lang.Object
  extended by org.openstreetmap.josm.gui.MultiSplitLayout.Node
Direct Known Subclasses:
MultiSplitLayout.Divider, MultiSplitLayout.Leaf, MultiSplitLayout.Split
Enclosing class:
MultiSplitLayout

public abstract static class MultiSplitLayout.Node
extends java.lang.Object

Base class for the nodes that model a MultiSplitLayout.


Field Summary
private  java.awt.Rectangle bounds
           
private  MultiSplitLayout.Split parent
           
private  double weight
           
 
Constructor Summary
MultiSplitLayout.Node()
           
 
Method Summary
 java.awt.Rectangle getBounds()
          Returns the bounding Rectangle for this Node.
 MultiSplitLayout.Split getParent()
          Returns the Split parent of this Node, or null.
 double 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.
 MultiSplitLayout.Node nextSibling()
          Return the Node that comes after this one in the parent's list of children, or null.
 MultiSplitLayout.Node previousSibling()
          Return the Node that comes before this one in the parent's list of children, or null.
 void setBounds(java.awt.Rectangle bounds)
          Set the bounding Rectangle for this node.
 void setParent(MultiSplitLayout.Split parent)
          Set the value of this Node's parent property.
 void setWeight(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.Node siblingAtOffset(int offset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

private MultiSplitLayout.Split parent

bounds

private java.awt.Rectangle bounds

weight

private double weight
Constructor Detail

MultiSplitLayout.Node

public MultiSplitLayout.Node()
Method Detail

getParent

public MultiSplitLayout.Split getParent()
Returns the Split parent of this Node, or null.

Returns:
the value of the parent property.
See Also:
setParent(org.openstreetmap.josm.gui.MultiSplitLayout.Split)

setParent

public void setParent(MultiSplitLayout.Split parent)
Set the value of this Node's parent property. The default value of this property is null.

Parameters:
parent - a Split or null
See Also:
getParent()

getBounds

public java.awt.Rectangle getBounds()
Returns the bounding Rectangle for this Node.

Returns:
the value of the bounds property.
See Also:
setBounds(java.awt.Rectangle)

setBounds

public void setBounds(java.awt.Rectangle bounds)
Set the bounding Rectangle for this node. The value of bounds may not be null. The default value of bounds is equal to new Rectangle(0,0,0,0).

Parameters:
bounds - the new value of the bounds property
Throws:
java.lang.IllegalArgumentException - if bounds is null
See Also:
getBounds()

getWeight

public double 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(double)

setWeight

public void setWeight(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. 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:
java.lang.IllegalArgumentException - if weight is not between 0.0 and 1.0
See Also:
getWeight(), MultiSplitLayout.layoutContainer(java.awt.Container)

siblingAtOffset

private MultiSplitLayout.Node siblingAtOffset(int offset)

nextSibling

public MultiSplitLayout.Node 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(), getParent()

previousSibling

public MultiSplitLayout.Node 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:
nextSibling(), getParent()


JOSM