de.matthiasmann.twl.model
Class TableSingleSelectionModel
java.lang.Object
de.matthiasmann.twl.model.AbstractTableSelectionModel
de.matthiasmann.twl.model.TableSingleSelectionModel
- All Implemented Interfaces:
- TableSelectionModel
public class TableSingleSelectionModel
- extends AbstractTableSelectionModel
A single selection model
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_SELECTION
public static final int NO_SELECTION
- See Also:
- Constant Field Values
TableSingleSelectionModel
public TableSingleSelectionModel()
rowsInserted
public void rowsInserted(int index,
int count)
- Specified by:
rowsInserted in interface TableSelectionModel- Overrides:
rowsInserted in class AbstractTableSelectionModel
rowsDeleted
public void rowsDeleted(int index,
int count)
- Specified by:
rowsDeleted in interface TableSelectionModel- Overrides:
rowsDeleted in class AbstractTableSelectionModel
clearSelection
public void clearSelection()
setSelection
public void setSelection(int index0,
int index1)
- Description copied from interface:
TableSelectionModel
- Sets the selection to the given interval (both indices inclusive).
Single selection should use index1.
- Parameters:
index0 - the start index of the interval.index1 - the end index of the interval.
addSelection
public void addSelection(int index0,
int index1)
- Description copied from interface:
TableSelectionModel
- Adds the given interval (both indices inclusive) to the selection.
Single selection should use index1.
- Parameters:
index0 - the start index of the interval.index1 - the end index of the interval.
invertSelection
public void invertSelection(int index0,
int index1)
- Description copied from interface:
TableSelectionModel
- Inverts the given interval (both indices inclusive) in the selection.
Single selection should use index1.
- Parameters:
index0 - the start index of the interval.index1 - the end index of the interval.
removeSelection
public void removeSelection(int index0,
int index1)
- Description copied from interface:
TableSelectionModel
- Removes the given interval (both indices inclusive) from the selection.
Single selection should clear the selection.
- Parameters:
index0 - the start index of the interval.index1 - the end index of the interval.
isSelected
public boolean isSelected(int index)
hasSelection
public boolean hasSelection()
getFirstSelected
public int getFirstSelected()
getLastSelected
public int getLastSelected()
getSelection
public int[] getSelection()