|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.tree.DefaultTreeModel<T>
T - public class DefaultTreeModel<T>
A default implementation of TreeModel that starts with a ValueEncoder (for the element to string conversion),
a TreeModelAdapter, and a list of root nodes.
| Constructor Summary | |
|---|---|
DefaultTreeModel(ValueEncoder<T> encoder,
TreeModelAdapter<T> adapter,
List<T> roots)
Standard constructor. |
|
DefaultTreeModel(ValueEncoder<T> encoder,
TreeModelAdapter<T> adapter,
T root)
Creates a new model starting from a single root element. |
|
| 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(String id)
Locates a node in the tree by its unique id. |
List<TreeNode<T>> |
getRootNodes()
Returns the node or nodes that are the top level of the tree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultTreeModel(ValueEncoder<T> encoder,
TreeModelAdapter<T> adapter,
T root)
encoder - used to convert values to strings and vice-versaadapter - adapts elements to the treeroot - defines the root node of the model
public DefaultTreeModel(ValueEncoder<T> encoder,
TreeModelAdapter<T> adapter,
List<T> roots)
encoder - used to convert values to strings and vice-versaadapter - adapts elements to the treeroots - defines the root nodes of the model| Method Detail |
|---|
public List<TreeNode<T>> getRootNodes()
TreeModel
getRootNodes in interface TreeModel<T>public TreeNode<T> getById(String id)
TreeModel
getById in interface TreeModel<T>TreeNode.getId()public TreeNode<T> find(T element)
TreeModel
find in interface TreeModel<T>element - to search for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||