Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.tree
Interface TreeModel<T>

Type Parameters:
  `T` - type of data in the tree

All Known Implementing Classes:
  DefaultTreeModel

    public interface TreeModel<T>

A model for tree-oriented data used by the `Tree` component. The default implemention, `DefaultTreeModel` uses a `ValueEncoder` and a `TreeModelAdapter` to supply the underlying information.

Since:
  5.3
See Also:
  `TreeSelectionModel`

Method Summary
`TreeNode<T>` | `find(T element)` Recursively searches from the root nodes to find the tree node that matches the provided element.
`TreeNode<T>` | `getById(java.lang.String id)` Locates a node in the tree by its unique id.
`java.util.List<TreeNode<T>>` | `getRootNodes()` Returns the node or nodes that are the top level of the tree.

Method Detail

### getRootNodes

    java.util.List<TreeNode<T>> getRootNodes()

  Returns the node or nodes that are the top level of the tree.

### getById

    TreeNode<T> getById(java.lang.String id)

  Locates a node in the tree by its unique id.

  Throws:
    `java.lang.IllegalArgumentException` - if no such node exists
  See Also:
    `TreeNode.getId()`

### find

    TreeNode<T> find(T element)

  Recursively searches from the root nodes to find the tree node that matches the provided element.

  Parameters:
    `element` - to search for
  Returns:
    matching node, or null if not found

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.