ch.randelshofer.tree.rectmap
Class RectmapNode
java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double
ch.randelshofer.tree.rectmap.RectmapNode
- All Implemented Interfaces:
- java.awt.Shape, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- RectmapCompositeNode
public class RectmapNode
- extends java.awt.geom.Rectangle2D.Double
The RectmapNode encapsulatets a TreeNode whithin a RectmapTree.
It holds the width and height of the node as an absolute value.
The location is held relative to the location of the parent node.
This node can layout its subtree in a space-filling rectangular
treemap.
- Version:
- 1.2 2009-03-22 Made layout progress observable.
1.0 Jan 16, 2008 Created.
- Author:
- Werner Randelshofer
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D |
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float |
| Fields inherited from class java.awt.geom.Rectangle2D.Double |
height, width, x, y |
| Fields inherited from class java.awt.geom.Rectangle2D |
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
| Methods inherited from class java.awt.geom.Rectangle2D.Double |
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect |
| Methods inherited from class java.awt.geom.Rectangle2D |
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union |
| Methods inherited from class java.awt.geom.RectangularShape |
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
parent
protected RectmapNode parent
dataNodePath
protected TreePath2<TreeNode> dataNodePath
cumulatedWeight
protected double cumulatedWeight
RectmapNode
public RectmapNode(RectmapNode parent,
TreeNode data)
children
public java.util.List<RectmapNode> children()
isLeaf
public boolean isLeaf()
getDataNodePath
public TreePath2<TreeNode> getDataNodePath()
layout
public void layout(ProgressObserver p)
- Lays out the subtree starting at this node in a space-filling
rectangular treemap.
Note: You must call updateCumulatedWeight before you can layout a
node.
getParent
public RectmapNode getParent()
updateCumulatedWeight
public void updateCumulatedWeight(NodeInfo info)
getCumulatedWeight
public double getCumulatedWeight()
getDescendantCount
public int getDescendantCount()
toString
public java.lang.String toString()
- Overrides:
toString in class java.awt.geom.Rectangle2D.Double