JClass DesktopViews 6.3.0 API
Documentation

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

Field Summary
 
Fields inherited from class javax.swing.DefaultListSelectionModel
leadAnchorNotificationEnabled, listenerList
 
Fields inherited from interface javax.swing.ListSelectionModel
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION
 
Constructor Summary
JCDefaultListSelectionModel()
           
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JCDefaultListSelectionModel

public JCDefaultListSelectionModel()
Method Detail

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

Copyright © 2004 Quest Software Inc..
All rights reserved.