TreeMap Java Library

treemap
Interface TMNode

All Known Implementing Classes:
TMFileNode

public interface TMNode

The TMNode interface should be implemented by object that are node of the tree that want to be displayed in the TreeMap.

If you have already a tree structure, just implements this interface in node of the tree.

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

Method Summary
 java.util.Enumeration children()
          Returns the children of this node in an Enumeration.
 boolean isLeaf()
          Checks if this node is a leaf or not.
 void setUpdater(TMUpdater updater)
          Called by the TMUpdater constructor.
 

Method Detail

children

java.util.Enumeration children()
Returns the children of this node in an Enumeration. If this object does not have children, it should return an empty Enumeration, not null. All objects contained in the Enumeration should implements TMNode.

Returns:
an Enumeration containing childs of this node

isLeaf

boolean isLeaf()
Checks if this node is a leaf or not. A node could have no children and still not be a leaf.

Returns:
true if this node is a leaf; false otherwise

setUpdater

void setUpdater(TMUpdater updater)
Called by the TMUpdater constructor. Gives to this node a reference to a TMUpdater object. This node should use this reference to notify treemap that something has changed. See the differents update methods of the TMUpdater interface.

As this method is called by the constructor of TMUpdater, don't call methods of TMUpdater in this method.

Parameters:
updater - the TMUpdater to be called when something has changed

TreeMap Java Library

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