TreeMap Java Library

treemap
Class TreeMap

java.lang.Object
  extended by treemap.TreeMap

public class TreeMap
extends java.lang.Object

The TreeMap class implements a tree map representation for data. For information about treemap, see Schneiderman 1992

A TreeMap is build from hierarchical data, given as a tree of TMNode. So, the first parameter to give to build a TreeMap is the TMNode which is the root of the to-be-represented tree. The tree to be displayed by the TreeMap should be build before the call to TreeMap, that is the root node should return children when the children() method is called.

You can get a TMView (herited from JView) containing the TreeMap by calling getView(). It takes a TMSizeRenderer and a TMDrawRenderer as parameters.

Version:
2.5
Author:
Christophe Bouthier [bouthier@loria.fr]

Constructor Summary
TreeMap(TMModelNode model)
          Constructor.
TreeMap(TMNode root)
          Constructor.
 
Method Summary
 TMView getView(TMComputeSize cSize, TMComputeDraw cDraw)
          Returns a view of the treemap with the given renderers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeMap

public TreeMap(TMNode root)
Constructor.

Parameters:
root - the root of the tree to be represented; could not be null

TreeMap

public TreeMap(TMModelNode model)
Constructor.

Parameters:
model - the model of the tree to be represented; could not be null
Method Detail

getView

public TMView getView(TMComputeSize cSize,
                      TMComputeDraw cDraw)
Returns a view of the treemap with the given renderers.

Parameters:
cSize - the object computing the size; could not be null
cDraw - the object computing the drawing; could not be null
Returns:
the desired view of the treemap

TreeMap Java Library

TreeMap Java Library - www.bouthier.net - treemap.sf.net - 2001