sharpster.client.gui
Class SingleSelectionModel

java.lang.Object
  |
  +--javax.swing.DefaultListSelectionModel
        |
        +--sharpster.client.gui.SingleSelectionModel
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.ListSelectionModel, java.io.Serializable

public class SingleSelectionModel
extends javax.swing.DefaultListSelectionModel

Create a SINGLE_SELECTION ListSelectionModel that calls a new method, updateSingleSelection(), each time the selection changes. This can be a little bit more convienent than using the ListModels ListSelectionListener, since ListSelectionListeners are only given the range of indices that the change spans.

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
SingleSelectionModel()
           
 
Method Summary
 void setSelectionInterval(int index0, int index1)
           
 void updateSingleSelection(int oldIndex, int newIndex)
           
 
Methods inherited from class javax.swing.DefaultListSelectionModel
addListSelectionListener, addSelectionInterval, clearSelection, clone, fireValueChanged, fireValueChanged, fireValueChanged, getAnchorSelectionIndex, getLeadSelectionIndex, getListeners, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getSelectionMode, getValueIsAdjusting, insertIndexInterval, isLeadAnchorNotificationEnabled, isSelectedIndex, isSelectionEmpty, removeIndexInterval, removeListSelectionListener, removeSelectionInterval, setAnchorSelectionIndex, setLeadAnchorNotificationEnabled, setLeadSelectionIndex, setSelectionMode, setValueIsAdjusting, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleSelectionModel

public SingleSelectionModel()
Method Detail

setSelectionInterval

public void setSelectionInterval(int index0,
                                 int index1)
Specified by:
setSelectionInterval in interface javax.swing.ListSelectionModel
Overrides:
setSelectionInterval in class javax.swing.DefaultListSelectionModel

updateSingleSelection

public void updateSingleSelection(int oldIndex,
                                  int newIndex)