T - public class DefaultTreeModel<T> extends java.lang.Object implements TreeModel<T>
ValueEncoder (for the element to string conversion),
 a TreeModelAdapter, and a list of root nodes.
 This implementation is not thread safe.| Constructor and Description | 
|---|
| DefaultTreeModel(ValueEncoder<T> encoder,
                TreeModelAdapter<T> adapter,
                java.util.List<T> roots)Standard constructor. | 
| DefaultTreeModel(ValueEncoder<T> encoder,
                TreeModelAdapter<T> adapter,
                T root)Creates a new model starting from a single root element. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
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 modelpublic DefaultTreeModel(ValueEncoder<T> encoder, TreeModelAdapter<T> adapter, java.util.List<T> roots)
encoder - used to convert values to strings and vice-versaadapter - adapts elements to the treeroots - defines the root nodes of the modelpublic java.util.List<TreeNode<T>> getRootNodes()
TreeModelgetRootNodes in interface TreeModel<T>public TreeNode<T> getById(java.lang.String id)
TreeModelgetById in interface TreeModel<T>TreeNode.getId()${project.version} - Copyright © 2003-2015 The Apache Software Foundation.