org.freehep.jas.plugin.tree
Interface FTree


public interface FTree

Via the FTree interface it is possible to: - modify the existing tree structure - access and modify the tree selection through the FTreeSelectionManager - access existing FTreeNodes

Author:
The FreeHEP team @ SLAC.

Method Summary
 FTreeNodeAdapter adapterForClass(Class clazz)
          Get the FTreeNodeAdapter that describes the behavior for a given node's type on this tree.
 FTreeNodeAdapter[] adaptersForClass(Class clazz)
          Get all the FTreeNodeAdapters registered with this tree for the given class.
 FTreeNode findNode(FTreePath path)
          Get the FTreeNode corresponding to a given FTreePath.
 String name()
          Get the FTree's name.
 FTreeNode root()
          Get the root node for this tree.
 FTreeNode[] selectedNodes()
          Get the ordered array of the selected nodes for the FTree The nodes are in the order in which they were selected.
 void treeChanged(org.freehep.jas.plugin.tree.FTreeNotification notification)
          Notify the FTree that something has changed.
 

Method Detail

treeChanged

void treeChanged(org.freehep.jas.plugin.tree.FTreeNotification notification)
Notify the FTree that something has changed.

Parameters:
notification - The FTreeNotification containing the information regarding the FTree's change.

findNode

FTreeNode findNode(FTreePath path)
Get the FTreeNode corresponding to a given FTreePath.

Parameters:
path - The FTreePath for which the node is being requested.
Returns:
The corresponding FTreeNode. If no node is found for the give path, null is returned.

name

String name()
Get the FTree's name.

Returns:
The name of the FTree.

root

FTreeNode root()
Get the root node for this tree.

Returns:
The tree's root.

selectedNodes

FTreeNode[] selectedNodes()
Get the ordered array of the selected nodes for the FTree The nodes are in the order in which they were selected.

Returns:
The ordered array of the selected FTreeNode. If no nodes are selected, null is returned.

adapterForClass

FTreeNodeAdapter adapterForClass(Class clazz)
Get the FTreeNodeAdapter that describes the behavior for a given node's type on this tree. This method returns a single adapter that wraps all the adapters registered with this tree for the given class.

Parameters:
clazz - The type of the nodes for which the adapter is requested.
Returns:
The FTreeNodeAdapter for the given class.

adaptersForClass

FTreeNodeAdapter[] adaptersForClass(Class clazz)
Get all the FTreeNodeAdapters registered with this tree for the given class.

Parameters:
clazz - The type of the nodes for which the adapter is requested.
Returns:
The array of the FTreeNodeAdapters registered with this tree for the given node's type.


Copyright © 2013. All Rights Reserved.