hok.model
Interface ITreeNode

All Known Implementing Classes:
ATreeModel, TreeElement

public interface ITreeNode

Interface that provides methods for managing a tree node.

Author:
holger

Method Summary
 void addChild(ITreeNode child)
          Adds a child to the tree model.
 java.util.Set<ITreeNode> getChildren(ITreeNode parentElement)
          Returns the children of a parent element.
 ITreeNode getParent()
          Returns the parent of the current element.
 boolean hasChildren()
          Checks if the current element has children.
 void removeChild(ITreeNode child)
          Removes a child from the model.
 

Method Detail

getChildren

java.util.Set<ITreeNode> getChildren(ITreeNode parentElement)
Returns the children of a parent element.

Parameters:
parentElement - the parent element.
Returns:
a list of ITreeNode elements.

getParent

ITreeNode getParent()
Returns the parent of the current element.

Returns:
the parent element.

hasChildren

boolean hasChildren()
Checks if the current element has children.

Returns:
true if the element has children, false otherwise.

addChild

void addChild(ITreeNode child)
Adds a child to the tree model.

Parameters:
child - the child to add.

removeChild

void removeChild(ITreeNode child)
Removes a child from the model.

Parameters:
child - the child to remove.