public class

SingleLeafTreeSelectionModel

extends DefaultTreeSelectionModel
java.lang.Object
   ↳ javax.swing.tree.DefaultTreeSelectionModel
     ↳ com.sun.tools.example.debug.gui.SingleLeafTreeSelectionModel

Summary

[Expand]
Inherited Constants
From class javax.swing.tree.DefaultTreeSelectionModel
From interface javax.swing.tree.TreeSelectionModel
[Expand]
Inherited Fields
From class javax.swing.tree.DefaultTreeSelectionModel
Public Methods
void addSelectionPath(TreePath path)
Adds path to the current selection.
void addSelectionPaths(TreePath[] paths)
Adds paths to the current selection.
void setSelectionPath(TreePath path)
Sets the selection to path.
void setSelectionPaths(TreePath[] paths)
Sets the selection to the paths in paths.
[Expand]
Inherited Methods
From class javax.swing.tree.DefaultTreeSelectionModel
From class java.lang.Object
From interface javax.swing.tree.TreeSelectionModel

Public Methods

public void addSelectionPath (TreePath path)

Adds path to the current selection. If path is not currently in the selection the TreeSelectionListeners are notified. This has no effect if path is null.

Parameters
path the new path to add to the current selection

public void addSelectionPaths (TreePath[] paths)

Adds paths to the current selection. If any of the paths in paths are not currently in the selection the TreeSelectionListeners are notified. This has no effect if paths is null.

The lead path is set to the last element in paths.

If the selection mode is CONTIGUOUS_TREE_SELECTION, and adding the new paths would make the selection discontiguous. Then two things can result: if the TreePaths in paths are contiguous, then the selection becomes these TreePaths, otherwise the TreePaths aren't contiguous and the selection becomes the first TreePath in paths.

Parameters
paths the new path to add to the current selection

public void setSelectionPath (TreePath path)

Sets the selection to path. If this represents a change, then the TreeSelectionListeners are notified. If path is null, this has the same effect as invoking clearSelection.

Parameters
path new path to select

public void setSelectionPaths (TreePath[] paths)

Sets the selection to the paths in paths. If this represents a change the TreeSelectionListeners are notified. Potentially paths will be held by this object; in other words don't change any of the objects in the array once passed in.

If paths is null, this has the same effect as invoking clearSelection.

The lead path is set to the last path in pPaths.

If the selection mode is CONTIGUOUS_TREE_SELECTION, and adding the new paths would make the selection discontiguous, the selection is reset to the first TreePath in paths.

Parameters
paths new selection