Treeviz 0.37 2010-10-17

ch.randelshofer.tree.rectmap
Class RectmapCompositeNode

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.geom.Rectangle2D.Double
              extended by ch.randelshofer.tree.rectmap.RectmapNode
                  extended by ch.randelshofer.tree.rectmap.RectmapCompositeNode
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable

public class RectmapCompositeNode
extends RectmapNode

RectmapCompositeNode.

Version:
1.2 2009-03-22 Made layout progress observable.
1.1 2008-06-24 Replaced recursion in squarify algorithm by iteration.
1.0 Jan 16, 2008 Created.
Author:
Werner Randelshofer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
 
Fields inherited from class ch.randelshofer.tree.rectmap.RectmapNode
cumulatedWeight, dataNodePath, parent
 
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
 
Constructor Summary
RectmapCompositeNode(RectmapNode parent, TreeNode data)
          Creates a new instance.
 
Method Summary
 java.util.List<RectmapNode> children()
           
 int getDescendantCount()
           
 boolean isLeaf()
           
 void layout(ProgressObserver p)
          Lays out the children of this composite node using the squarify algorithm by Bruls, Huizing, and van Wijk, 2000.
 void updateCumulatedWeight(NodeInfo info)
           
 
Methods inherited from class ch.randelshofer.tree.rectmap.RectmapNode
getCumulatedWeight, getDataNodePath, getParent, toString
 
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
 

Constructor Detail

RectmapCompositeNode

public RectmapCompositeNode(RectmapNode parent,
                            TreeNode data)
Creates a new instance.

Method Detail

isLeaf

public boolean isLeaf()
Overrides:
isLeaf in class RectmapNode

children

public java.util.List<RectmapNode> children()
Overrides:
children in class RectmapNode

updateCumulatedWeight

public void updateCumulatedWeight(NodeInfo info)
Overrides:
updateCumulatedWeight in class RectmapNode

layout

public void layout(ProgressObserver p)
Lays out the children of this composite node using the squarify algorithm by Bruls, Huizing, and van Wijk, 2000.

Overrides:
layout in class RectmapNode
Parameters:
info -

getDescendantCount

public int getDescendantCount()
Overrides:
getDescendantCount in class RectmapNode

Copyright 2007-2008 (c) Werner Randelshofer.
All rights reserved.