ca.ucalgary.innovis
Interface NAryTreeNodeModel

All Superinterfaces:
javax.swing.tree.TreeNode
All Known Implementing Classes:
NAryTreeNode

public interface NAryTreeNodeModel
extends javax.swing.tree.TreeNode

Version:
1.2
Author:
Petra Neumann

Field Summary
static java.lang.String id
           
static java.lang.String type
           
 
Method Summary
 void addChild(NAryTreeNode child)
          Adds a child node to this node's list of children.
 java.lang.String getID()
          Returns the id for this node.
 int getLevel()
          Returns the level of this node.
 java.lang.String getType()
          Returns a type-string for this node.
 void removeChild(NAryTreeNode child)
          Removed the child from this node's list of children.
 void setID(java.lang.String id)
          Sets an id or name for this node.
 void setType(java.lang.String type)
          Sets a type for this node (could be used for coloring)
 
Methods inherited from interface javax.swing.tree.TreeNode
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Field Detail

id

static final java.lang.String id
See Also:
Constant Field Values

type

static final java.lang.String type
See Also:
Constant Field Values
Method Detail

addChild

void addChild(NAryTreeNode child)
Adds a child node to this node's list of children.

Parameters:
child - the child to be added

removeChild

void removeChild(NAryTreeNode child)
Removed the child from this node's list of children.

Parameters:
child - the child to be removed.

setID

void setID(java.lang.String id)
Sets an id or name for this node. This value should be unique for each node in the tree.

Parameters:
id - identifier for this node.

getID

java.lang.String getID()
Returns the id for this node.

Returns:
the id for this node.

getType

java.lang.String getType()
Returns a type-string for this node.

Returns:
a type for this node.

setType

void setType(java.lang.String type)
Sets a type for this node (could be used for coloring)

Parameters:
type - a String representing the type of this node.

getLevel

int getLevel()
Returns the level of this node. The root node has level 0.

Returns: