|
Java Platform 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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(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 |
getLeadSelectionRow()
Returns the lead selection index. |
int |
getMaxSelectionRow()
Gets the last selected row. |
int |
getMinSelectionRow()
Gets the first selected row. |
RowMapper |
getRowMapper()
Returns the RowMapper instance that is able to map a path to a row. |
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. |
int[] |
getSelectionRows()
Returns all of the currently selected rows. |
boolean |
isPathSelected(TreePath path)
Returns true if the path, path, is in the current selection. |
boolean |
isRowSelected(int row)
Returns true if the row identitifed by row is selected. |
boolean |
isSelectionEmpty()
Returns true if the selection is currently empty. |
void |
removePropertyChangeListener(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 |
resetRowSelection()
Updates what rows are selected. |
void |
setRowMapper(RowMapper newMapper)
Sets the RowMapper instance. |
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 |
public static final int SINGLE_TREE_SELECTION
public static final int CONTIGUOUS_TREE_SELECTION
public static final int DISCONTIGUOUS_TREE_SELECTION
Method Detail |
public void setSelectionMode(int mode)
public int getSelectionMode()
public void setSelectionPath(TreePath path)
path
- new path to selectpublic void setSelectionPaths(TreePath[] paths)
paths
- new selection.public void addSelectionPath(TreePath path)
path
- the new path to add to the current selection.public void addSelectionPaths(TreePath[] paths)
path
- the new path to add to the current selection.public void removeSelectionPath(TreePath path)
path
- the path to remove from the selection.public void removeSelectionPaths(TreePath[] paths)
path
- the path to remove from the selection.public TreePath getSelectionPath()
public TreePath[] getSelectionPaths()
public int getSelectionCount()
public boolean isPathSelected(TreePath path)
public boolean isSelectionEmpty()
public void clearSelection()
public void setRowMapper(RowMapper newMapper)
public RowMapper getRowMapper()
public int[] getSelectionRows()
public int getMinSelectionRow()
public int getMaxSelectionRow()
public boolean isRowSelected(int row)
public void resetRowSelection()
public int getLeadSelectionRow()
public TreePath getLeadSelectionPath()
public void addPropertyChangeListener(PropertyChangeListener listener)
A PropertyChangeEvent will get fired in response to an explicit setFont, setBackground, or SetForeground on the current component. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property.
listener
- The PropertyChangeListener to be addedpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removedpublic void addTreeSelectionListener(TreeSelectionListener x)
x
- the new listener to be added.public void removeTreeSelectionListener(TreeSelectionListener x)
x
- the listener to remove.
|
Java Platform 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |