Treeviz 0.37 2010-10-17

ch.randelshofer.tree.circlemap
Class CirclemapCompositeNode

java.lang.Object
  extended by ch.randelshofer.tree.circlemap.Circle
      extended by ch.randelshofer.tree.circlemap.CirclemapNode
          extended by ch.randelshofer.tree.circlemap.CirclemapCompositeNode
All Implemented Interfaces:
java.lang.Cloneable

public class CirclemapCompositeNode
extends CirclemapNode

The CirclemapNode class encapsulates a composite TreeNode whithin a CirclemapTree.

Version:
1.1 2010-08-19 Includes the weight of the composite node itself into the size calculation of a circle.
1.0 Jan 16, 2008 Created.
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from class ch.randelshofer.tree.circlemap.Circle
cx, cy, radius
 
Constructor Summary
CirclemapCompositeNode(CirclemapNode parent, TreeNode node)
          Creates a new instance.
 
Method Summary
 java.util.List<CirclemapNode> children()
           
 int getDescendantCount()
           
 boolean isLeaf()
           
 void layout(NodeInfo info, ProgressObserver p)
          Lays out the subtree starting at this data in a space-filling circular treemap.
 CirclemapNode newChildAdded(TreeNode c)
          Call this method when a new child node has been added to the underlying TreeNode.
 void updateNodeLayout(NodeInfo info)
          Updates the layout of this node only.
 
Methods inherited from class ch.randelshofer.tree.circlemap.CirclemapNode
getDataNode, getDataNodePath, getParent, getWeightRadius, toString, updateParentLayouts
 
Methods inherited from class ch.randelshofer.tree.circlemap.Circle
clone, contains, contains, contains, getCX, getCY, getIntersectionRadius, getRadius, intersects, intersects
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CirclemapCompositeNode

public CirclemapCompositeNode(CirclemapNode parent,
                              TreeNode node)
Creates a new instance.

Method Detail

isLeaf

public boolean isLeaf()
Overrides:
isLeaf in class CirclemapNode

children

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

layout

public void layout(NodeInfo info,
                   ProgressObserver p)
Description copied from class: CirclemapNode
Lays out the subtree starting at this data in a space-filling circular treemap.

Overrides:
layout in class CirclemapNode

updateNodeLayout

public void updateNodeLayout(NodeInfo info)
Updates the layout of this node only. Does not update the layout of child nodes or parent nodes.

Parameters:
info -

getDescendantCount

public int getDescendantCount()
Overrides:
getDescendantCount in class CirclemapNode

newChildAdded

public CirclemapNode newChildAdded(TreeNode c)
Call this method when a new child node has been added to the underlying TreeNode.

For performance reasons, this method will not update the layout of the circlemap.

Parameters:
c - the new child
Returns:
Returns the new CirclemapNode which holds the child.

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