com.infoviz.treeviz.nestedpie
Class NestedPieModel

java.lang.Object
  extended bycom.infoviz.treeviz.nestedpie.NestedPieModel

public class NestedPieModel
extends java.lang.Object

Title : NestedPieModel Description: The data model for nested pie. $Id$ $Revision$ $Author$


Constructor Summary
NestedPieModel()
           
 
Method Summary
 void addNode(NestedPieNode node)
          does not accept null nodes or nodes with null path if the last node in the path specified by this node is a leaf node then the node will not be added all nodes in a model must have the same number of path elements otherwise an IllegalArgumentException is thrown.
 NestedPieNode findNodeByPathAndName(java.lang.String path, java.lang.String name)
           
 double[] getColorValueBounds()
          returns the minimum and the maximum range of color this is calculated based on the standard deviation of the color values
 double getMeanColorValue()
           
 int getPathLength()
          returns the number of elements in a path.
protected  void recalculate()
          recalculates parent node sizes and color range of the model
 void removeNode(NestedPieNode node)
          will find its node by it's path and remove it
 void setName(java.lang.String name)
          name of the root node of the tree
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedPieModel

public NestedPieModel()
Method Detail

setName

public void setName(java.lang.String name)
name of the root node of the tree


toString

public java.lang.String toString()

findNodeByPathAndName

public NestedPieNode findNodeByPathAndName(java.lang.String path,
                                           java.lang.String name)

addNode

public void addNode(NestedPieNode node)
does not accept null nodes or nodes with null path if the last node in the path specified by this node is a leaf node then the node will not be added all nodes in a model must have the same number of path elements otherwise an IllegalArgumentException is thrown. getPathLength() method returns the length of the path


recalculate

protected void recalculate()
recalculates parent node sizes and color range of the model


removeNode

public void removeNode(NestedPieNode node)
will find its node by it's path and remove it


getMeanColorValue

public double getMeanColorValue()

getColorValueBounds

public double[] getColorValueBounds()
returns the minimum and the maximum range of color this is calculated based on the standard deviation of the color values


getPathLength

public int getPathLength()
returns the number of elements in a path. This value applies for all the nodes in the model