org.apache.myfaces.custom.tree2
Interface TreeModel

All Superinterfaces:
Serializable
All Known Implementing Classes:
TreeModelBase

public interface TreeModel
extends Serializable

Model class for the tree component. It provides random access to nodes in a tree made up of instances of the TreeNode class.

Version:
$Revision: 472638 $ $Date: 2006-11-08 15:54:13 -0500 (Wed, 08 Nov 2006) $
Author:
Sean Schofield

Field Summary
static String SEPARATOR
          Separator char to be used in node path generation.
 
Method Summary
 TreeNode getNodeById(String nodeId)
           
 String[] getPathInformation(String nodeId)
          Gets an array of String containing the ID's of all of the TreeNodes in the path to the specified node.
 TreeState getTreeState()
           
 TreeWalker getTreeWalker()
          Gets the TreeWalker associated with the model.
 boolean isLastChild(String nodeId)
          Indicates whether or not the specified TreeNode is the last child in the List of children.
 void setTreeState(TreeState state)
           
 

Field Detail

SEPARATOR

static final String SEPARATOR
Separator char to be used in node path generation.

Method Detail

getPathInformation

String[] getPathInformation(String nodeId)
Gets an array of String containing the ID's of all of the TreeNodes in the path to the specified node. The path information will be an array of String objects representing node ID's. The array will starting with the ID of the root node and end with the ID of the specified node.

Parameters:
nodeId - The id of the node for whom the path information is needed.
Returns:
String[]

isLastChild

boolean isLastChild(String nodeId)
Indicates whether or not the specified TreeNode is the last child in the List of children. If the node id provided corresponds to the root node, this returns true.

Parameters:
nodeId - The ID of the node to check
Returns:
boolean

getNodeById

TreeNode getNodeById(String nodeId)

setTreeState

void setTreeState(TreeState state)

getTreeState

TreeState getTreeState()

getTreeWalker

TreeWalker getTreeWalker()
Gets the TreeWalker associated with the model. Allows the user to customize the manner in which nodes are walked by the renderer.

Returns:
TreeWalker


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.