charvax.swing.tree
Interface TreeSelectionModel


public interface TreeSelectionModel

This interface represents the current state of the selection for the tree component. The Charva version of the TreeSelectionModel supports SINGLE_TREE_SELECTION only. As a result, the state of the tree selection is characterized by a single TreePath,


Method Summary
 void addTreeSelectionListener(TreeSelectionListener listener)
          Adds "listener" to the list of listeners that are notified each time the set of selected TreePaths changes.
 void clearSelection()
          Empties the current selection.
 TreePath getSelectionPath()
          Returns the first path in the selection.
 boolean isPathSelected(TreePath path)
          Returns true if "path" is in the current selection.
 boolean isSelectionEmpty()
          Returns true if the selection is currently empty.
 void removeTreeSelectionListener(TreeSelectionListener listener)
          Removes "listener" from the list of listeners that are notified each time the set of selected TreePaths changes.
 void setSelectionPath(TreePath path)
          Sets the selection to "path".
 

Method Detail

getSelectionPath

TreePath getSelectionPath()
Returns the first path in the selection.


setSelectionPath

void setSelectionPath(TreePath path)
Sets the selection to "path".


clearSelection

void clearSelection()
Empties the current selection.


isPathSelected

boolean isPathSelected(TreePath path)
Returns true if "path" is in the current selection.


isSelectionEmpty

boolean isSelectionEmpty()
Returns true if the selection is currently empty.


addTreeSelectionListener

void addTreeSelectionListener(TreeSelectionListener listener)
Adds "listener" to the list of listeners that are notified each time the set of selected TreePaths changes.


removeTreeSelectionListener

void removeTreeSelectionListener(TreeSelectionListener listener)
Removes "listener" from the list of listeners that are notified each time the set of selected TreePaths changes.