Treeviz 0.37 2010-10-17

ch.randelshofer.tree.demo
Class FileNodeInfo

java.lang.Object
  extended by ch.randelshofer.tree.DefaultNodeInfo
      extended by ch.randelshofer.tree.demo.FileNodeInfo
All Implemented Interfaces:
NodeInfo

public class FileNodeInfo
extends DefaultNodeInfo

FileNodeInfo.

Version:
1.1 2009-03-20 Factured weight formatting out.
1.0 September 25, 2007 Created.

Constructor Summary
FileNodeInfo()
          Creates a new instance.
 
Method Summary
 java.awt.Color getColor(TreePath2<TreeNode> path)
          Returns the color of the node.
 Colorizer getColorizer()
           
 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 toggleColorWeighter()
           
 
Methods inherited from class ch.randelshofer.tree.DefaultNodeInfo
addChangeListener, fireStateChanged, getCumulatedWeight, getImage, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileNodeInfo

public FileNodeInfo()
Creates a new instance.

Method Detail

init

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

Specified by:
init in interface NodeInfo
Overrides:
init in class DefaultNodeInfo

getWeighter

public Weighter getWeighter()
Specified by:
getWeighter in interface NodeInfo
Overrides:
getWeighter in class DefaultNodeInfo

getColorizer

public Colorizer getColorizer()
Specified by:
getColorizer in interface NodeInfo
Overrides:
getColorizer in class DefaultNodeInfo

getWeight

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

Specified by:
getWeight in interface NodeInfo
Overrides:
getWeight in class DefaultNodeInfo
Returns:
The weight between 0 and Double.MAX_VALUE.

getColor

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

Specified by:
getColor in interface NodeInfo
Overrides:
getColor in class DefaultNodeInfo

getName

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

Specified by:
getName in interface NodeInfo
Overrides:
getName in class DefaultNodeInfo

getTooltip

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

Specified by:
getTooltip in interface NodeInfo
Overrides:
getTooltip in class DefaultNodeInfo

getWeightFormatted

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

Specified by:
getWeightFormatted in interface NodeInfo
Overrides:
getWeightFormatted in class DefaultNodeInfo

toggleColorWeighter

public void toggleColorWeighter()
Specified by:
toggleColorWeighter in interface NodeInfo
Overrides:
toggleColorWeighter in class DefaultNodeInfo

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