org.apache.myfaces.custom.tree.model
public class DefaultTreeModel extends Object implements TreeModel
Version: $Revision: 169651 $ $Date: 2005-05-11 18:14:23 +0200 (Wed, 11 May 2005) $
| Constructor Summary | |
|---|---|
| DefaultTreeModel() | |
| DefaultTreeModel(TreeNode root) | |
| Method Summary | |
|---|---|
| protected void | fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
Notify all listeners of a node change.
|
| protected void | fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
Notify all listeners of structure change.
|
| protected void | fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
Notify all listeners of structure change.
|
| protected void | fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
Notify all listeners of structure change.
|
| protected void | fireTreeStructureChanged(Object source, TreePath path)
Notify all listeners of structure change.
|
| Object | getChild(Object parent, int index) |
| int | getChildCount(Object parent) |
| int | getIndexOfChild(Object parent, Object child) |
| TreeNode[] | getPathToRoot(TreeNode node)
Collect all parent nodes up to the root node.
|
| protected TreeNode[] | getPathToRoot(TreeNode node, int depth)
Recursivly collect parent nodes up the the root node.
|
| Object | getRoot() |
| Collection | getTreeModelListeners() |
| boolean | isLeaf(Object node) |
| void | nodeChanged(TreeNode node)
Invoke this method after you've changed how node is to be
represented in the tree. |
| void | nodesChanged(TreeNode node, int[] childIndices)
Invoke this method after you've changed how the children identified by
childIndicies are to be represented in the tree. |
| void | nodesWereInserted(TreeNode node, int[] childIndices)
Invoke this method after you've inserted some TreeNodes into
node. childIndices should be the index of the new elements and
must be sorted in ascending order. |
| void | nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren)
Invoke this method after you've removed some TreeNodes from
node. childIndices should be the index of the removed elements and
must be sorted in ascending order. |
| void | nodeStructureChanged(TreeNode node)
Invoke this method if you've totally changed the children of
node and its childrens children... |
| void | valueForPathChanged(TreePath path, Object newValue) |
Parameters: source the node being changed path the path to the root node childIndices the indices of the changed elements children the changed elements
Parameters: source the node where new elements are being inserted path the path to the root node childIndices the indices of the new elements children the new elements
Parameters: source the node where elements are being removed path the path to the root node childIndices the indices of the removed elements children the removed elements
Parameters: source the node where the tree model has changed path the path to the root node childIndices the indices of the affected elements children the affected elements
Parameters: source the node where the tree model has changed path the path to the root node
Parameters: node the TreeNode to get the path for
Parameters: node the TreeNode to get the path for depth number of steps already taken towards the root (on recursive calls)
Returns: an array giving the path from the root to the specified node