Treeviz 0.37 2010-10-17

ch.randelshofer.tree.demo
Class ManyEyesNodeInfo

java.lang.Object
  extended by ch.randelshofer.tree.demo.AbstractNodeInfo
      extended by ch.randelshofer.tree.demo.ManyEyesNodeInfo
All Implemented Interfaces:
NodeInfo

public class ManyEyesNodeInfo
extends AbstractNodeInfo

ManyEyesNodeInfo.

Version:
1.0 2009-02-07 Created.
Author:
Werner Randelshofer, Staldenmattweg 2, CH-6405 Immensee

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.randelshofer.tree.demo.AbstractNodeInfo
AbstractNodeInfo.DataType
 
Constructor Summary
ManyEyesNodeInfo(ManyEyesTree tree)
           
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
           
 void collectAttributes(java.util.ArrayList<ManyEyesNode> nodes, java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> attrMap)
           
 void computeBasicStats(java.util.ArrayList<ManyEyesNode> nodes, java.util.HashMap<java.lang.String,AbstractNodeInfo.DataType> typeMap, java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> attrMap)
           
 java.awt.Color getColor(TreePath2<TreeNode> path)
          Returns the color of the node.
 Colorizer getColorizer()
           
 long getCumulatedWeight(TreePath2<TreeNode> path)
          Returns the cumulated weight of a node (the sum of the weights of this node and of all its children).
 java.awt.Image getImage(TreePath2<TreeNode> path)
          Returns the image of the node.
 java.lang.String getName(TreePath2<TreeNode> path)
          Returns the name of the node.
 java.lang.String getTooltip(TreePath2<TreeNode> path)
          Returns the tooltip of the node.
 long getWeight(TreePath2<TreeNode> path)
          Returns the weight of a node.
 Weighter getWeighter()
           
 java.lang.String getWeightFormatted(TreePath2<TreeNode> path)
          Returns the string formatted weight of a node.
 void init(TreeNode root)
          Initializes the node info.
 void removeChangeListener(javax.swing.event.ChangeListener l)
           
 void toggleColorWeighter()
           
 
Methods inherited from class ch.randelshofer.tree.demo.AbstractNodeInfo
determineDataType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManyEyesNodeInfo

public ManyEyesNodeInfo(ManyEyesTree tree)
Method Detail

init

public void init(TreeNode root)
Description copied from interface: NodeInfo
Initializes the node info.


computeBasicStats

public void computeBasicStats(java.util.ArrayList<ManyEyesNode> nodes,
                              java.util.HashMap<java.lang.String,AbstractNodeInfo.DataType> typeMap,
                              java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> attrMap)

collectAttributes

public void collectAttributes(java.util.ArrayList<ManyEyesNode> nodes,
                              java.util.HashMap<java.lang.String,java.util.HashSet<java.lang.String>> attrMap)

getName

public java.lang.String getName(TreePath2<TreeNode> path)
Description copied from interface: NodeInfo
Returns the name of the node.


getColor

public java.awt.Color getColor(TreePath2<TreeNode> path)
Description copied from interface: NodeInfo
Returns the color of the node.


getCumulatedWeight

public long getCumulatedWeight(TreePath2<TreeNode> path)
Description copied from interface: NodeInfo
Returns the cumulated weight of a node (the sum of the weights of this node and of all its children).

Returns:
The weight between 0 and Double.MAX_VALUE.

getWeight

public long getWeight(TreePath2<TreeNode> path)
Description copied from interface: NodeInfo
Returns the weight of a node.

Returns:
The weight between 0 and Double.MAX_VALUE.

getWeightFormatted

public java.lang.String getWeightFormatted(TreePath2<TreeNode> path)
Description copied from interface: NodeInfo
Returns the string formatted weight of a node.


getTooltip

public java.lang.String getTooltip(TreePath2<TreeNode> path)
Description copied from interface: NodeInfo
Returns the tooltip of the node.


getImage

public java.awt.Image getImage(TreePath2<TreeNode> path)
Description copied from interface: NodeInfo
Returns the image of the node.


getWeighter

public Weighter getWeighter()

getColorizer

public Colorizer getColorizer()

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)

toggleColorWeighter

public void toggleColorWeighter()

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