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.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:
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 void
addListSelectionListener(javax.swing.event.ListSelectionListener viewLnr)
void
addSelectionInterval(int index0, int index1)
void
clearSelection()
int
getAnchorSelectionIndex()
int
getLeadSelectionIndex()
int
getMaxSelectionIndex()
int
getMinSelectionIndex()
int
getSelectionMode()
boolean
getValueIsAdjusting()
void
insertIndexInterval(int index, int length, boolean before)
boolean
isSelectedIndex(int index)
boolean
isSelectionEmpty()
void
removeIndexInterval(int index0, int index1)
void
removeListSelectionListener(javax.swing.event.ListSelectionListener viewLnr)
void
removeSelectionInterval(int index0, int index1)
void
setAnchorSelectionIndex(int index)
void
setLeadSelectionIndex(int index)
void
setSelectionInterval(int index0, int index1)
void
setSelectionMode(int selectionMode)
void
setValueIsAdjusting(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 suppliedtmodel
tmodel
- ViewHugeTableModel presenting an underlying huge table to a JTable
-
-
Method Detail
-
setSelectionInterval
public void setSelectionInterval(int index0, int index1)
- Specified by:
setSelectionInterval
in interfacejavax.swing.ListSelectionModel
-
addSelectionInterval
public void addSelectionInterval(int index0, int index1)
- Specified by:
addSelectionInterval
in interfacejavax.swing.ListSelectionModel
-
removeSelectionInterval
public void removeSelectionInterval(int index0, int index1)
- Specified by:
removeSelectionInterval
in interfacejavax.swing.ListSelectionModel
-
getMinSelectionIndex
public int getMinSelectionIndex()
- Specified by:
getMinSelectionIndex
in interfacejavax.swing.ListSelectionModel
-
getMaxSelectionIndex
public int getMaxSelectionIndex()
- Specified by:
getMaxSelectionIndex
in interfacejavax.swing.ListSelectionModel
-
isSelectedIndex
public boolean isSelectedIndex(int index)
- Specified by:
isSelectedIndex
in interfacejavax.swing.ListSelectionModel
-
getAnchorSelectionIndex
public int getAnchorSelectionIndex()
- Specified by:
getAnchorSelectionIndex
in interfacejavax.swing.ListSelectionModel
-
setAnchorSelectionIndex
public void setAnchorSelectionIndex(int index)
- Specified by:
setAnchorSelectionIndex
in interfacejavax.swing.ListSelectionModel
-
getLeadSelectionIndex
public int getLeadSelectionIndex()
- Specified by:
getLeadSelectionIndex
in interfacejavax.swing.ListSelectionModel
-
setLeadSelectionIndex
public void setLeadSelectionIndex(int index)
- Specified by:
setLeadSelectionIndex
in interfacejavax.swing.ListSelectionModel
-
clearSelection
public void clearSelection()
- Specified by:
clearSelection
in interfacejavax.swing.ListSelectionModel
-
isSelectionEmpty
public boolean isSelectionEmpty()
- Specified by:
isSelectionEmpty
in interfacejavax.swing.ListSelectionModel
-
insertIndexInterval
public void insertIndexInterval(int index, int length, boolean before)
- Specified by:
insertIndexInterval
in interfacejavax.swing.ListSelectionModel
-
removeIndexInterval
public void removeIndexInterval(int index0, int index1)
- Specified by:
removeIndexInterval
in interfacejavax.swing.ListSelectionModel
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean valueIsAdjusting)
- Specified by:
setValueIsAdjusting
in interfacejavax.swing.ListSelectionModel
-
getValueIsAdjusting
public boolean getValueIsAdjusting()
- Specified by:
getValueIsAdjusting
in interfacejavax.swing.ListSelectionModel
-
setSelectionMode
public void setSelectionMode(int selectionMode)
- Specified by:
setSelectionMode
in interfacejavax.swing.ListSelectionModel
-
getSelectionMode
public int getSelectionMode()
- Specified by:
getSelectionMode
in interfacejavax.swing.ListSelectionModel
-
addListSelectionListener
public void addListSelectionListener(javax.swing.event.ListSelectionListener viewLnr)
- Specified by:
addListSelectionListener
in interfacejavax.swing.ListSelectionModel
-
removeListSelectionListener
public void removeListSelectionListener(javax.swing.event.ListSelectionListener viewLnr)
- Specified by:
removeListSelectionListener
in interfacejavax.swing.ListSelectionModel
-
-