public class RowHeaderSelectionModel
extends javax.swing.DefaultListSelectionModel
| Constructor and Description |
|---|
RowHeaderSelectionModel()
Create a RowHeaderSelectionModel.
|
RowHeaderSelectionModel(javax.swing.JTable table)
Create a RowHeaderSelectionModel for the specified table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSelectionInterval(int index0,
int index1) |
void |
clearSelection() |
int |
getSelectionMode() |
boolean |
isShrinkSelection() |
void |
moveLeadSelectionIndex(int leadIndex) |
void |
removeSelectionInterval(int index0,
int index1) |
void |
setAnchorSelectionIndex(int anchorIndex) |
void |
setLeadSelectionIndex(int leadIndex) |
void |
setSelectionInterval(int index0,
int index1) |
void |
setShrinkSelection(boolean shrinkSelection)
If the header has multiple rows selected and the user clicks on one of those already selected rows, the
model may shrink selection to just that row, or it can keep selection unchanged.
|
void |
setTable(javax.swing.JTable table)
Sets the table this RowSelectionModel is working for.
|
addListSelectionListener, clone, fireValueChanged, fireValueChanged, fireValueChanged, getAnchorSelectionIndex, getLeadSelectionIndex, getListeners, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getValueIsAdjusting, insertIndexInterval, isLeadAnchorNotificationEnabled, isSelectedIndex, isSelectionEmpty, removeIndexInterval, removeListSelectionListener, setLeadAnchorNotificationEnabled, setSelectionMode, setValueIsAdjusting, toStringpublic RowHeaderSelectionModel()
public RowHeaderSelectionModel(javax.swing.JTable table)
public void setTable(javax.swing.JTable table)
public void setSelectionInterval(int index0,
int index1)
setSelectionInterval in interface javax.swing.ListSelectionModelsetSelectionInterval in class javax.swing.DefaultListSelectionModelpublic void addSelectionInterval(int index0,
int index1)
addSelectionInterval in interface javax.swing.ListSelectionModeladdSelectionInterval in class javax.swing.DefaultListSelectionModelpublic void removeSelectionInterval(int index0,
int index1)
removeSelectionInterval in interface javax.swing.ListSelectionModelremoveSelectionInterval in class javax.swing.DefaultListSelectionModelpublic void setAnchorSelectionIndex(int anchorIndex)
setAnchorSelectionIndex in interface javax.swing.ListSelectionModelsetAnchorSelectionIndex in class javax.swing.DefaultListSelectionModelpublic void setLeadSelectionIndex(int leadIndex)
setLeadSelectionIndex in interface javax.swing.ListSelectionModelsetLeadSelectionIndex in class javax.swing.DefaultListSelectionModelpublic void clearSelection()
clearSelection in interface javax.swing.ListSelectionModelclearSelection in class javax.swing.DefaultListSelectionModelpublic int getSelectionMode()
getSelectionMode in interface javax.swing.ListSelectionModelgetSelectionMode in class javax.swing.DefaultListSelectionModelpublic void moveLeadSelectionIndex(int leadIndex)
moveLeadSelectionIndex in class javax.swing.DefaultListSelectionModelpublic final void setShrinkSelection(boolean shrinkSelection)
This is useful for CheckRowHeader type headers as it allows users to multiselect rows and then check/uncheck them all with one click.
shrinkSelection - public final boolean isShrinkSelection()