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.


Method Index

 o addSelectionPath(JTreePath)
Adds path to the current selection.
 o addSelectionPaths(JTreePath[])
Adds paths to the current selection.
 o addTreeSelectionListener(TreeSelectionListener)
Adds x to the list of listeners that are notified each time the selection changes.
 o clearSelection()
Empties the current selection.
 o getMaxSelectionRow()
Gets the last selected row.
 o getMinSelectionRow()
Gets the first selected row.
 o getRowMapper()
Returns the RowMapper instance that is able to map a path to a row.
 o getSelectionCount()
Returns the number of paths that are selected.
 o getSelectionPath()
Returns the first path in the selection.
 o getSelectionPaths()
Returns the paths in the selection.
 o getSelectionRows()
Returns all of the currently selected rows.
 o isPathSelected(JTreePath)
Returns true if the path, path, is in the current selection.
 o isRowSelected(int)
Returns true if the row identitifed by row is selected.
 o isSelectionEmpty()
Returns true if the selection is currently empty.
 o removeSelectionPath(JTreePath)
Removes path from the selection.
 o removeSelectionPaths(JTreePath[])
Removes paths from the selection.
 o removeTreeSelectionListener(TreeSelectionListener)
Removes x from the list of listeners that are notified each time the selection changes.
 o resetRowSelection()
Updates what rows are selected.
 o setRowMapper(RowMapper)
Sets the RowMapper instance.
 o setSelectionPath(JTreePath)
Sets the selection to path.
 o setSelectionPaths(JTreePath[])
Sets the selection to the the paths.

Methods

 o 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
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o getSelectionPath
 public abstract JTreePath getSelectionPath()
Returns the first path in the selection.

 o getSelectionPaths
 public abstract JTreePath[] getSelectionPaths()
Returns the paths in the selection.

 o getSelectionCount
 public abstract int getSelectionCount()
Returns the number of paths that are selected.

 o isPathSelected
 public abstract boolean isPathSelected(JTreePath path)
Returns true if the path, path, is in the current selection.

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

 o clearSelection
 public abstract void clearSelection()
Empties the current selection. If this represents a change in the current selection, the selection listeners are notified.

 o setRowMapper
 public abstract void setRowMapper(RowMapper newMapper)
Sets the RowMapper instance. This instance is used to determine what row corresponds to what path.

 o getRowMapper
 public abstract RowMapper getRowMapper()
Returns the RowMapper instance that is able to map a path to a row.

 o getSelectionRows
 public abstract int[] getSelectionRows()
Returns all of the currently selected rows.

 o getMinSelectionRow
 public abstract int getMinSelectionRow()
Gets the first selected row.

 o getMaxSelectionRow
 public abstract int getMaxSelectionRow()
Gets the last selected row.

 o isRowSelected
 public abstract boolean isRowSelected(int row)
Returns true if the row identitifed by row is selected.

 o 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.

 o 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.
 o 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