Class ViewHugeSelectionModel
java.lang.Object
uk.ac.starlink.table.gui.ViewHugeSelectionModel
- All Implemented Interfaces:
ListSelectionModel
ListSelectionModel to use in conjunction with a ViewHugeTableModel
for tracking row selection of very large tables.
Since the rows of the ViewHugeTableModel keep changing which rows
of the underlying huge model they are talking about, the selection
model has to understand how that happens if you want to have
row selection that persists as the scroll bar is moved around.
This is the model which should be installed on the JTable.
- Since:
- 16 Jul 2014
- Author:
- Mark Taylor
- See Also:
-
Field Summary
Fields inherited from interface ListSelectionModel
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION -
Constructor Summary
ConstructorsConstructorDescriptionViewHugeSelectionModel(ListSelectionModel hugeModel, ViewHugeTableModel tmodel) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddSelectionInterval(int index0, int index1) voidintintintintintbooleanvoidinsertIndexInterval(int index, int length, boolean before) booleanisSelectedIndex(int index) booleanvoidremoveIndexInterval(int index0, int index1) voidvoidremoveSelectionInterval(int index0, int index1) voidsetAnchorSelectionIndex(int index) voidsetLeadSelectionIndex(int index) voidsetSelectionInterval(int index0, int index1) voidsetSelectionMode(int selectionMode) voidsetValueIsAdjusting(boolean valueIsAdjusting) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ListSelectionModel
getSelectedIndices, getSelectedItemsCount
-
Constructor Details
-
ViewHugeSelectionModel
Constructor.- Parameters:
hugeModel- list selection model corresonding to the table model underlying the suppliedtmodeltmodel- ViewHugeTableModel presenting an underlying huge table to a JTable
-
-
Method Details
-
setSelectionInterval
public void setSelectionInterval(int index0, int index1) - Specified by:
setSelectionIntervalin interfaceListSelectionModel
-
addSelectionInterval
public void addSelectionInterval(int index0, int index1) - Specified by:
addSelectionIntervalin interfaceListSelectionModel
-
removeSelectionInterval
public void removeSelectionInterval(int index0, int index1) - Specified by:
removeSelectionIntervalin interfaceListSelectionModel
-
getMinSelectionIndex
public int getMinSelectionIndex()- Specified by:
getMinSelectionIndexin interfaceListSelectionModel
-
getMaxSelectionIndex
public int getMaxSelectionIndex()- Specified by:
getMaxSelectionIndexin interfaceListSelectionModel
-
isSelectedIndex
public boolean isSelectedIndex(int index) - Specified by:
isSelectedIndexin interfaceListSelectionModel
-
getAnchorSelectionIndex
public int getAnchorSelectionIndex()- Specified by:
getAnchorSelectionIndexin interfaceListSelectionModel
-
setAnchorSelectionIndex
public void setAnchorSelectionIndex(int index) - Specified by:
setAnchorSelectionIndexin interfaceListSelectionModel
-
getLeadSelectionIndex
public int getLeadSelectionIndex()- Specified by:
getLeadSelectionIndexin interfaceListSelectionModel
-
setLeadSelectionIndex
public void setLeadSelectionIndex(int index) - Specified by:
setLeadSelectionIndexin interfaceListSelectionModel
-
clearSelection
public void clearSelection()- Specified by:
clearSelectionin interfaceListSelectionModel
-
isSelectionEmpty
public boolean isSelectionEmpty()- Specified by:
isSelectionEmptyin interfaceListSelectionModel
-
insertIndexInterval
public void insertIndexInterval(int index, int length, boolean before) - Specified by:
insertIndexIntervalin interfaceListSelectionModel
-
removeIndexInterval
public void removeIndexInterval(int index0, int index1) - Specified by:
removeIndexIntervalin interfaceListSelectionModel
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean valueIsAdjusting) - Specified by:
setValueIsAdjustingin interfaceListSelectionModel
-
getValueIsAdjusting
public boolean getValueIsAdjusting()- Specified by:
getValueIsAdjustingin interfaceListSelectionModel
-
setSelectionMode
public void setSelectionMode(int selectionMode) - Specified by:
setSelectionModein interfaceListSelectionModel
-
getSelectionMode
public int getSelectionMode()- Specified by:
getSelectionModein interfaceListSelectionModel
-
addListSelectionListener
- Specified by:
addListSelectionListenerin interfaceListSelectionModel
-
removeListSelectionListener
- Specified by:
removeListSelectionListenerin interfaceListSelectionModel
-