Java javax.swing.tree TreeSelectionModel fields, constructors, methods, implement or subclass

Example usage for Java javax.swing.tree TreeSelectionModel fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing.tree TreeSelectionModel.

The text is from its open source code.

Implementation

javax.swing.tree.TreeSelectionModel has the following implementations.
Click this link to see all its implementation.

Field

intSINGLE_TREE_SELECTION
Selection can only contain one path at a time.
intCONTIGUOUS_TREE_SELECTION
Selection can only be contiguous.
intDISCONTIGUOUS_TREE_SELECTION
Selection can contain any number of items that are not necessarily contiguous.

Method

voidaddSelectionPath(TreePath path)
Adds path to the current selection.
voidaddTreeSelectionListener(TreeSelectionListener x)
Adds x to the list of listeners that are notified each time the set of selected TreePaths changes.
voidclearSelection()
Empties the current selection.
int[]getSelectionRows()
Returns all of the currently selected rows.
booleanisPathSelected(TreePath path)
Returns true if the path, path, is in the current selection.
booleanisSelectionEmpty()
Returns true if the selection is currently empty.
voidsetSelectionMode(int mode)
Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
voidsetSelectionPath(TreePath path)
Sets the selection to path.