TMFileModelNode

Kind of class:public class
Package:treemap.demo
Inherits from:none
Implements:
Version:2.5
Author:Christophe Bouthier [bouthier@loria.fr]
Package classpath:treemap.demo.TMFileModelNode
File last modified:Friday, 28 December 2001, 20:57:00
The TMFileModelNode implements an example of TMModelNode encapsulating Files.

Summary


Constructors
Instance fields
Instance methods
  • getRoot
    • Returns the root of the tree.
  • children
    • Returns the children of this node in an Enumeration.
  • isLeaf
    • Returns true if this node is not a directory.
  • setUpdater
    • Sets the updater for this node.

Constructors

TMFileModelNode

public TMFileModelNode(
File root)

Constructor.
Parameters:
root:
the File root of this tree

Instance fields

root

private File root = null

updater

private TMModelUpdater updater = null

Instance methods

children

public Enumeration children(
Object node)

Returns the children of this node in an Enumeration.
If this node is a file, return a empty Enumeration.
Else, return an Enumeration full with TMFileNode.
Returns:
  • an Enumeration containing childs of this node
Specified by:

getRoot

public Object getRoot(
)

Returns the root of the tree.
Should not return null.
Returns:
  • the root of the tree
Specified by:

isLeaf

public boolean isLeaf(
Object node)

Returns true if this node is not a directory.
Returns:
  • false if this node is a directory;
    true otherwise
Specified by:

setUpdater

public void setUpdater(

Sets the updater for this node.
Parameters:
updater:
the updater for this node
Specified by: