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

## com.sun.javatest.tool
Interface TreeSelectionPane.Model

Enclosing class:
  TreeSelectionPane

    public static interface TreeSelectionPane.Model

The model for the tree whose nodes can be selected in a TreeSelectionPane.

Method Summary
`java.lang.Object` | `getChild(java.lang.Object node, int index)` Get a specific child of a node.
`int` | `getChildCount(java.lang.Object node)` Get the number of children for a node.
`java.lang.String` | `getName(java.lang.Object node)` Get the name of a node.
`java.lang.String` | `getPath(java.lang.Object node)` Get the path of a node.
`java.lang.Object` | `getRoot()` Get the root node of the tree.
`boolean` | `isLeaf(java.lang.Object node)` Check whether or not a node is a leaf node.

Method Detail

### getRoot

    java.lang.Object getRoot()

  Get the root node of the tree.

  Returns:
    the root node of the tree

### getChildCount

    int getChildCount(java.lang.Object node)

  Get the number of children for a node.

  Parameters:
    `node` - the node for which the number of children is required
  Returns:
    the number of children of the specified node

### getChild

    java.lang.Object getChild(java.lang.Object node,
                              int index)

  Get a specific child of a node.

  Parameters:
    `node` - the node for which the child is required
    `index` - the index of the desired child; this should be in the range [0..getChildCount())
  Returns:
    the specified child node

### getName

    java.lang.String getName(java.lang.Object node)

  Get the name of a node. The name should identify the child within the set of its parent's children.

  Parameters:
    `node` - the node for which the name is required
  Returns:
    the name of the node

### getPath

    java.lang.String getPath(java.lang.Object node)

  Get the path of a node. The path is a series of names, separated by '/', which identify successive children, initially relative to the root node.

  Parameters:
    `node` - the node for which the path is required
  Returns:
    the path of the node

### isLeaf

    boolean isLeaf(java.lang.Object node)

  Check whether or not a node is a leaf node. This is simply a semantic distinction for a node, that will be used to determine how the node should be displayed; it is independent of whether a node has any children or not.

  Parameters:
    `node` - the node to be checked
  Returns:
    true if the node is a leaf node, and false otherwise

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 (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.