Package uk.ac.starlink.table.gui
Class ViewHugeSelectionModel
- java.lang.Object
-
- uk.ac.starlink.table.gui.ViewHugeSelectionModel
-
- All Implemented Interfaces:
javax.swing.ListSelectionModel
public class ViewHugeSelectionModel extends java.lang.Object implements javax.swing.ListSelectionModelListSelectionModel 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:
ViewHugeTableModel
-
-
Constructor Summary
Constructors Constructor Description ViewHugeSelectionModel(javax.swing.ListSelectionModel hugeModel, ViewHugeTableModel tmodel)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListSelectionListener(javax.swing.event.ListSelectionListener viewLnr)voidaddSelectionInterval(int index0, int index1)voidclearSelection()intgetAnchorSelectionIndex()intgetLeadSelectionIndex()intgetMaxSelectionIndex()intgetMinSelectionIndex()intgetSelectionMode()booleangetValueIsAdjusting()voidinsertIndexInterval(int index, int length, boolean before)booleanisSelectedIndex(int index)booleanisSelectionEmpty()voidremoveIndexInterval(int index0, int index1)voidremoveListSelectionListener(javax.swing.event.ListSelectionListener viewLnr)voidremoveSelectionInterval(int index0, int index1)voidsetAnchorSelectionIndex(int index)voidsetLeadSelectionIndex(int index)voidsetSelectionInterval(int index0, int index1)voidsetSelectionMode(int selectionMode)voidsetValueIsAdjusting(boolean valueIsAdjusting)
-
-
-
Constructor Detail
-
ViewHugeSelectionModel
public ViewHugeSelectionModel(javax.swing.ListSelectionModel hugeModel, ViewHugeTableModel tmodel)Constructor.- Parameters:
hugeModel- list selection model corresonding to the table model underlying the suppliedtmodeltmodel- ViewHugeTableModel presenting an underlying huge table to a JTable
-
-
Method Detail
-
setSelectionInterval
public void setSelectionInterval(int index0, int index1)- Specified by:
setSelectionIntervalin interfacejavax.swing.ListSelectionModel
-
addSelectionInterval
public void addSelectionInterval(int index0, int index1)- Specified by:
addSelectionIntervalin interfacejavax.swing.ListSelectionModel
-
removeSelectionInterval
public void removeSelectionInterval(int index0, int index1)- Specified by:
removeSelectionIntervalin interfacejavax.swing.ListSelectionModel
-
getMinSelectionIndex
public int getMinSelectionIndex()
- Specified by:
getMinSelectionIndexin interfacejavax.swing.ListSelectionModel
-
getMaxSelectionIndex
public int getMaxSelectionIndex()
- Specified by:
getMaxSelectionIndexin interfacejavax.swing.ListSelectionModel
-
isSelectedIndex
public boolean isSelectedIndex(int index)
- Specified by:
isSelectedIndexin interfacejavax.swing.ListSelectionModel
-
getAnchorSelectionIndex
public int getAnchorSelectionIndex()
- Specified by:
getAnchorSelectionIndexin interfacejavax.swing.ListSelectionModel
-
setAnchorSelectionIndex
public void setAnchorSelectionIndex(int index)
- Specified by:
setAnchorSelectionIndexin interfacejavax.swing.ListSelectionModel
-
getLeadSelectionIndex
public int getLeadSelectionIndex()
- Specified by:
getLeadSelectionIndexin interfacejavax.swing.ListSelectionModel
-
setLeadSelectionIndex
public void setLeadSelectionIndex(int index)
- Specified by:
setLeadSelectionIndexin interfacejavax.swing.ListSelectionModel
-
clearSelection
public void clearSelection()
- Specified by:
clearSelectionin interfacejavax.swing.ListSelectionModel
-
isSelectionEmpty
public boolean isSelectionEmpty()
- Specified by:
isSelectionEmptyin interfacejavax.swing.ListSelectionModel
-
insertIndexInterval
public void insertIndexInterval(int index, int length, boolean before)- Specified by:
insertIndexIntervalin interfacejavax.swing.ListSelectionModel
-
removeIndexInterval
public void removeIndexInterval(int index0, int index1)- Specified by:
removeIndexIntervalin interfacejavax.swing.ListSelectionModel
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean valueIsAdjusting)
- Specified by:
setValueIsAdjustingin interfacejavax.swing.ListSelectionModel
-
getValueIsAdjusting
public boolean getValueIsAdjusting()
- Specified by:
getValueIsAdjustingin interfacejavax.swing.ListSelectionModel
-
setSelectionMode
public void setSelectionMode(int selectionMode)
- Specified by:
setSelectionModein interfacejavax.swing.ListSelectionModel
-
getSelectionMode
public int getSelectionMode()
- Specified by:
getSelectionModein interfacejavax.swing.ListSelectionModel
-
addListSelectionListener
public void addListSelectionListener(javax.swing.event.ListSelectionListener viewLnr)
- Specified by:
addListSelectionListenerin interfacejavax.swing.ListSelectionModel
-
removeListSelectionListener
public void removeListSelectionListener(javax.swing.event.ListSelectionListener viewLnr)
- Specified by:
removeListSelectionListenerin interfacejavax.swing.ListSelectionModel
-
-