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

## echopointng.tree
Interface TreeSelectionModel

All Known Implementing Classes:
  DefaultTreeSelectionModel, EmptyTreeSelectionModel

    public interface TreeSelectionModel

This interface represents the current state of the selection for the `Tree` component.

Field Summary
`static int` | `CONTIGUOUS_TREE_SELECTION` Selection can only be contiguous.
`static int` | `DISCONTIGUOUS_TREE_SELECTION` Selection can contain any number of items that are not necessarily contiguous.
`static int` | `SINGLE_TREE_SELECTION` Selection can only contain one path at a time.

Method Summary
`void` | `addPropertyChangeListener(java.beans.PropertyChangeListener listener)` Add a PropertyChangeListener to the listener list.
`void` | `addSelectionPath(TreePath path)` Adds path to the current selection.
`void` | `addSelectionPaths(TreePath[] paths)` Adds paths to the current selection.
`void` | `addTreeSelectionListener(TreeSelectionListener x)` Adds x to the list of listeners that are notified each time the selection changes.
`void` | `clearSelection()` Empties the current selection.
`TreePath` | `getLeadSelectionPath()` Returns the last path that was added.
`int` | `getSelectionCount()` Returns the number of paths that are selected.
`int` | `getSelectionMode()` Returns the selection mode.
`TreePath` | `getSelectionPath()` Returns the first path in the selection.
`TreePath[]` | `getSelectionPaths()` Returns the paths in the selection.
`boolean` | `isPathSelected(TreePath path)` Returns true if the path, path, is in the current selection.
`boolean` | `isSelectionEmpty()` Returns true if the selection is currently empty.
`void` | `removePropertyChangeListener(java.beans.PropertyChangeListener listener)` Remove a PropertyChangeListener from the listener list.
`void` | `removeSelectionPath(TreePath path)` Removes path from the selection.
`void` | `removeSelectionPaths(TreePath[] paths)` Removes paths from the selection.
`void` | `removeTreeSelectionListener(TreeSelectionListener x)` Removes x from the list of listeners that are notified each time the selection changes.
`void` | `setSelectionMode(int mode)` Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
`void` | `setSelectionPath(TreePath path)` Sets the selection to path.
`void` | `setSelectionPaths(TreePath[] paths)` Sets the selection to the the paths.

Field Detail

### CONTIGUOUS_TREE_SELECTION

    static final int CONTIGUOUS_TREE_SELECTION

  Selection can only be contiguous. This will only be enforced if a RowMapper instance is provided.

  See Also:
    Constant Field Values

### DISCONTIGUOUS_TREE_SELECTION

    static final int DISCONTIGUOUS_TREE_SELECTION

  Selection can contain any number of items that are not necessarily contiguous.

  See Also:
    Constant Field Values

### SINGLE_TREE_SELECTION

    static final int SINGLE_TREE_SELECTION

  Selection can only contain one path at a time.

  See Also:
    Constant Field Values

Method Detail

### addPropertyChangeListener

    void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

  Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

  Parameters:
    `listener` - The PropertyChangeListener to be added

### addSelectionPath

    void addSelectionPath(TreePath path)

  Adds path to the current selection. If path is not currently in the selection the TreeSelectionListeners are notified.

  Parameters:
    `path` - the new path to add to the current selection.

### addSelectionPaths

    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.

  Parameters:
    `paths` - the new paths to add to the current selection.

### addTreeSelectionListener

    void addTreeSelectionListener(TreeSelectionListener x)

  Adds x to the list of listeners that are notified each time the selection changes.

  Parameters:
    `x` - the new listener to be added.

### clearSelection

    void clearSelection()

  Empties the current selection. If this represents a change in the current selection, the selection listeners are notified.

### getLeadSelectionPath

    TreePath getLeadSelectionPath()

  Returns the last path that was added.

### getSelectionCount

    int getSelectionCount()

  Returns the number of paths that are selected.

### getSelectionMode

    int getSelectionMode()

  Returns the selection mode.

### getSelectionPath

    TreePath getSelectionPath()

  Returns the first path in the selection.

### getSelectionPaths

    TreePath[] getSelectionPaths()

  Returns the paths in the selection.

### isPathSelected

    boolean isPathSelected(TreePath path)

  Returns true if the path, path, is in the current selection.

### isSelectionEmpty

    boolean isSelectionEmpty()

  Returns true if the selection is currently empty.

### removePropertyChangeListener

    void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

  Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

  Parameters:
    `listener` - The PropertyChangeListener to be removed

### removeSelectionPath

    void removeSelectionPath(TreePath path)

  Removes path from the selection. If path is in the selection The TreeSelectionListeners are notified.

  Parameters:
    `path` - the path to remove from the selection.

### removeSelectionPaths

    void removeSelectionPaths(TreePath[] paths)

  Removes paths from the selection. If any of the paths in paths are in the selection the TreeSelectionListeners are notified.

  Parameters:
    `paths` - the paths to remove from the selection.

### removeTreeSelectionListener

    void removeTreeSelectionListener(TreeSelectionListener x)

  Removes x from the list of listeners that are notified each time the selection changes.

  Parameters:
    `x` - the listener to remove.

### setSelectionMode

    void setSelectionMode(int mode)

  Sets the selection model, which must be one of SINGLE_TREE_SELECTION, CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.

### setSelectionPath

    void setSelectionPath(TreePath path)

  Sets the selection to path. If this represents a change, then the TreeSelectionListeners are notified.

  Parameters:
    `path` - new path to select

### setSelectionPaths

    void setSelectionPaths(TreePath[] paths)

  Sets the selection to the the paths. If this represents a change the TreeSelectionListeners are notified.

  Parameters:
    `paths` - new selection.

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