com.jgoodies.chart
Interface TreeChartModel<T>

All Known Implementing Classes:
AbstractTreeChartModel, FileTreeChartModel

public interface TreeChartModel<T>

Describes the model required by the ring chart and tree map.

Version:
$Revision: 1.3 $
Author:
Karsten Lentzsch

Method Summary
 void addChangeListener(ChangeListener listener)
          Adds the given listener to the list of observers.
 T getChild(T node, int index)
           
 int getChildCount(T node)
          Returns the number of children of the given node.
 T getRoot()
          Returns this tree's root node.
 long getSize(T node)
          Returns the size of the given node.
 boolean isLeaf(T node)
          Used to determine how to color the node in a tree map.
 void removeChangeListener(ChangeListener listener)
          Removes the given listener fromthe list of observers.
 

Method Detail

getRoot

T getRoot()
Returns this tree's root node.

Returns:
the root node

getChildCount

int getChildCount(T node)
Returns the number of children of the given node.

Returns:
the number of chilren of the given node

getChild

T getChild(T node,
           int index)

getSize

long getSize(T node)
Returns the size of the given node.


isLeaf

boolean isLeaf(T node)
Used to determine how to color the node in a tree map.

Parameters:
node - the node to be checked
Returns:
true if leaf, false otherwise

addChangeListener

void addChangeListener(ChangeListener listener)
Adds the given listener to the list of observers.

Parameters:
listener - the listener to be added
Throws:
NullPointerException - if the listener is null

removeChangeListener

void removeChangeListener(ChangeListener listener)
Removes the given listener fromthe list of observers. Does nothing if the listener is null.

Parameters:
listener - the listener to be added


Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.