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 TreeNode<T>

Type Parameters:
  `T` - type of node

    public interface TreeNode<T>

A node within a `TreeModel`. In a `DefaultTreeModel`, most of the node's information comes via the `TreeModelAdapter`.

Since:
  5.3

Method Summary
`java.util.List<TreeNode<T>>` | `getChildren()` Returns the actual children of this non-leaf node, as additional nodes.
`boolean` | `getHasChildren()` Returns true if this non-leaf node has child nodes.
`java.lang.String` | `getId()` Returns a string Id for the node that uniquely identifies it.
`java.lang.String` | `getLabel()` Returns a textual label for the node.
`T` | `getValue()` Returns the value represented by this node.
`boolean` | `isLeaf()` If true, then this node is a leaf node, which never has children (i.e., a file).

Method Detail

### getId

    java.lang.String getId()

  Returns a string Id for the node that uniquely identifies it.

  Returns:
    unique string identifying the node
  See Also:
    `TreeModel.getById(String)`

### getValue

    T getValue()

  Returns the value represented by this node.

### isLeaf

    boolean isLeaf()

  If true, then this node is a leaf node, which never has children (i.e., a file). If false, the node may have children (i.e., a folder).

  Returns:
    true for leaf nodes, false for folder nodes
  See Also:
    `TreeModelAdapter.isLeaf(Object)`

### getHasChildren

    boolean getHasChildren()

  Returns true if this non-leaf node has child nodes. This will not be invoked for leaf nodes.

  See Also:
    `TreeModelAdapter.hasChildren(Object)`

### getChildren

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

  Returns the actual children of this non-leaf node, as additional nodes.

  See Also:
    `TreeModelAdapter.getChildren(Object)`

### getLabel

    java.lang.String getLabel()

  Returns a textual label for the node. Not all UIs will make use of the label, but default UIs will.

  See Also:
    `TreeModelAdapter.getLabel(Object)`

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.