All Packages Class Hierarchy This Package Previous Next Index
Interface com.sun.java.swing.TreeSelectionModel
- public interface TreeSelectionModel
This interface represents the current state of the selection for
the tree component. It will keep track of the selected rows, but
in order to select by row you will need to go directly to the tree.
-
addSelectionPath(JTreePath)
- Adds path to the current selection.
-
addSelectionPaths(JTreePath[])
- Adds paths to the current selection.
-
addTreeSelectionListener(TreeSelectionListener)
- Adds x to the list of listeners that are notified each time the
selection changes.
-
clearSelection()
- Empties the current selection.
-
getMaxSelectionRow()
- Gets the last selected row.
-
getMinSelectionRow()
- Gets the first selected row.
-
getRowMapper()
- Returns the RowMapper instance that is able to map a path to a
row.
-
getSelectionCount()
- Returns the number of paths that are selected.
-
getSelectionPath()
- Returns the first path in the selection.
-
getSelectionPaths()
- Returns the paths in the selection.
-
getSelectionRows()
- Returns all of the currently selected rows.
-
isPathSelected(JTreePath)
- Returns true if the path, path, is in the current selection.
-
isRowSelected(int)
- Returns true if the row identitifed by row is selected.
-
isSelectionEmpty()
- Returns true if the selection is currently empty.
-
removeSelectionPath(JTreePath)
- Removes path from the selection.
-
removeSelectionPaths(JTreePath[])
- Removes paths from the selection.
-
removeTreeSelectionListener(TreeSelectionListener)
- Removes x from the list of listeners that are notified each time
the selection changes.
-
resetRowSelection()
- Updates what rows are selected.
-
setRowMapper(RowMapper)
- Sets the RowMapper instance.
-
setSelectionPath(JTreePath)
- Sets the selection to path.
-
setSelectionPaths(JTreePath[])
- Sets the selection to the the paths.
setSelectionPath
public abstract void setSelectionPath(JTreePath path)
- Sets the selection to path. If this represents a change, then
the PathSelectionListeners are notified.
- Parameters:
- path - new path to select
setSelectionPaths
public abstract void setSelectionPaths(JTreePath paths[])
- Sets the selection to the the paths. If this represents a
change the PathSelectionListeners are notified.
- Parameters:
- paths - new selection.
addSelectionPath
public abstract void addSelectionPath(JTreePath path)
- Adds path to the current selection. If path is not currently
in the selection the PathSelectionListeners are notified.
- Parameters:
- path - the new path to add to the current selection.
addSelectionPaths
public abstract void addSelectionPaths(JTreePath paths[])
- Adds paths to the current selection. If any of the paths in
paths are not currently in the selection the PathSelectionListeners
are notified.
- Parameters:
- path - the new path to add to the current selection.
removeSelectionPath
public abstract void removeSelectionPath(JTreePath path)
- Removes path from the selection. If path is in the selection
The PathSelectionListeners are notified.
- Parameters:
- path - the path to remove from the selection.
removeSelectionPaths
public abstract void removeSelectionPaths(JTreePath paths[])
- Removes paths from the selection. If any of the paths in paths
are in the selection the PathSelectionListeners are notified.
- Parameters:
- path - the path to remove from the selection.
getSelectionPath
public abstract JTreePath getSelectionPath()
- Returns the first path in the selection.
getSelectionPaths
public abstract JTreePath[] getSelectionPaths()
- Returns the paths in the selection.
getSelectionCount
public abstract int getSelectionCount()
- Returns the number of paths that are selected.
isPathSelected
public abstract boolean isPathSelected(JTreePath path)
- Returns true if the path, path, is in the current selection.
isSelectionEmpty
public abstract boolean isSelectionEmpty()
- Returns true if the selection is currently empty.
clearSelection
public abstract void clearSelection()
- Empties the current selection. If this represents a change in the
current selection, the selection listeners are notified.
setRowMapper
public abstract void setRowMapper(RowMapper newMapper)
- Sets the RowMapper instance. This instance is used to determine
what row corresponds to what path.
getRowMapper
public abstract RowMapper getRowMapper()
- Returns the RowMapper instance that is able to map a path to a
row.
getSelectionRows
public abstract int[] getSelectionRows()
- Returns all of the currently selected rows.
getMinSelectionRow
public abstract int getMinSelectionRow()
- Gets the first selected row.
getMaxSelectionRow
public abstract int getMaxSelectionRow()
- Gets the last selected row.
isRowSelected
public abstract boolean isRowSelected(int row)
- Returns true if the row identitifed by row is selected.
resetRowSelection
public abstract void resetRowSelection()
- Updates what rows are selected. This can be externally called in
case the location of the paths change, but not the actual paths.
You do not normally need to call this.
addTreeSelectionListener
public abstract 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.
removeTreeSelectionListener
public abstract 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.
All Packages Class Hierarchy This Package Previous Next Index