TreeMap Java Library

treemap
Interface TMUpdater


public interface TMUpdater

The TMUpdater interface represents the object that a TMNode should call to notify the treemap that something has changed : size, state, numers of childs, ... A TMNode gets a reference to a TMUpdater object in the building of the treemap, by the setUpdater() method. A TMNode should call the corresponding update method when something has changed.

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

Method Summary
 void addChild(TMNode node, TMNode child)
          To be called when the user node has a new child.
 void removeChild(TMNode node, TMNode child)
          To be called when the user node removes a child.
 void updateSize(TMNode node)
          To be called when the user node has its size changed.
 void updateState(TMNode node)
          To be called when the user node has its state changed.
 

Method Detail

updateSize

void updateSize(TMNode node)
To be called when the user node has its size changed.

Parameters:
node - the node that has its size changed

updateState

void updateState(TMNode node)
To be called when the user node has its state changed.

Parameters:
node - the node that has its state changed

addChild

void addChild(TMNode node,
              TMNode child)
To be called when the user node has a new child.

Parameters:
node - the node that has a new child
child - the node's new child

removeChild

void removeChild(TMNode node,
                 TMNode child)
To be called when the user node removes a child.

Parameters:
node - the node that removes a child
child - the node's lost child

TreeMap Java Library

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