com.klg.jclass.swing
Class JCDefaultListSelectionModel
java.lang.Object
|
+--javax.swing.DefaultListSelectionModel
|
+--com.klg.jclass.swing.JCDefaultListSelectionModel
- All Implemented Interfaces:
- Cloneable, ListSelectionModel, Serializable
- public class JCDefaultListSelectionModel
- extends DefaultListSelectionModel
Extend the DefaultListSelectionModel to fix a bug in Swing which forgets to
update the anchor and lead when rows are added or deleted.
- See Also:
- Serialized Form
Method Summary |
void |
insertIndexInterval(int index,
int length,
boolean before)
Insert length indices beginning before/after index. |
void |
removeIndexInterval(int index0,
int index1)
Remove the indices in the interval index0,index1 (inclusive) from
the selection model. |
Methods inherited from class javax.swing.DefaultListSelectionModel |
addListSelectionListener, addSelectionInterval, clearSelection, clone, fireValueChanged, fireValueChanged, fireValueChanged, getAnchorSelectionIndex, getLeadSelectionIndex, getListeners, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getSelectionMode, getValueIsAdjusting, isLeadAnchorNotificationEnabled, isSelectedIndex, isSelectionEmpty, removeListSelectionListener, removeSelectionInterval, setAnchorSelectionIndex, setLeadAnchorNotificationEnabled, setLeadSelectionIndex, setSelectionInterval, setSelectionMode, setValueIsAdjusting, toString |
JCDefaultListSelectionModel
public JCDefaultListSelectionModel()
insertIndexInterval
public void insertIndexInterval(int index,
int length,
boolean before)
- Insert length indices beginning before/after index. This is typically
called to sync the selection model with a corresponding change
in the data model.
- Specified by:
insertIndexInterval
in interface ListSelectionModel
- Overrides:
insertIndexInterval
in class DefaultListSelectionModel
removeIndexInterval
public void removeIndexInterval(int index0,
int index1)
- Remove the indices in the interval index0,index1 (inclusive) from
the selection model. This is typically called to sync the selection
model width a corresponding change in the data model.
- Specified by:
removeIndexInterval
in interface ListSelectionModel
- Overrides:
removeIndexInterval
in class DefaultListSelectionModel