javax.swing
Class DefaultListSelectionModel

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.DefaultListSelectionModel
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel

public class DefaultListSelectionModel
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

Default data model for list selections.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel , Serialized Form

Field Summary
protected  boolean leadAnchorNotificationEnabled sample code for javax.swing.DefaultListSelectionModel.leadAnchorNotificationEnabled definition code for javax.swing.DefaultListSelectionModel.leadAnchorNotificationEnabled
           
protected  EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList listenerList sample code for javax.swing.DefaultListSelectionModel.listenerList definition code for javax.swing.DefaultListSelectionModel.listenerList
           
 
Fields inherited from interface javax.swing.ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel
MULTIPLE_INTERVAL_SELECTION sample code for javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION definition code for javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION , SINGLE_INTERVAL_SELECTION sample code for javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION definition code for javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION , SINGLE_SELECTION sample code for javax.swing.ListSelectionModel.SINGLE_SELECTION definition code for javax.swing.ListSelectionModel.SINGLE_SELECTION
 
Constructor Summary
DefaultListSelectionModel sample code for javax.swing.DefaultListSelectionModel.DefaultListSelectionModel() definition code for javax.swing.DefaultListSelectionModel.DefaultListSelectionModel() ()
           
 
Method Summary
 void addListSelectionListener sample code for javax.swing.DefaultListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.DefaultListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) (ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener  l)
          Add a listener to the list that's notified each time a change to the selection occurs.
 void addSelectionInterval sample code for javax.swing.DefaultListSelectionModel.addSelectionInterval(int, int) definition code for javax.swing.DefaultListSelectionModel.addSelectionInterval(int, int) (int index0, int index1)
          Change the selection to be the set union of the current selection and the indices between index0 and index1 inclusive.
 void clearSelection sample code for javax.swing.DefaultListSelectionModel.clearSelection() definition code for javax.swing.DefaultListSelectionModel.clearSelection() ()
          Change the selection to the empty set.
 Object sample code for java.lang.Object definition code for java.lang.Object clone sample code for javax.swing.DefaultListSelectionModel.clone() definition code for javax.swing.DefaultListSelectionModel.clone() ()
          Returns a clone of this selection model with the same selection.
protected  void fireValueChanged sample code for javax.swing.DefaultListSelectionModel.fireValueChanged(boolean) definition code for javax.swing.DefaultListSelectionModel.fireValueChanged(boolean) (boolean isAdjusting)
          Notifies listeners that we have ended a series of adjustments.
protected  void fireValueChanged sample code for javax.swing.DefaultListSelectionModel.fireValueChanged(int, int) definition code for javax.swing.DefaultListSelectionModel.fireValueChanged(int, int) (int firstIndex, int lastIndex)
          Notifies ListSelectionListeners that the value of the selection, in the closed interval firstIndex, lastIndex, has changed.
protected  void fireValueChanged sample code for javax.swing.DefaultListSelectionModel.fireValueChanged(int, int, boolean) definition code for javax.swing.DefaultListSelectionModel.fireValueChanged(int, int, boolean) (int firstIndex, int lastIndex, boolean isAdjusting)
           
 int getAnchorSelectionIndex sample code for javax.swing.DefaultListSelectionModel.getAnchorSelectionIndex() definition code for javax.swing.DefaultListSelectionModel.getAnchorSelectionIndex() ()
          Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
 int getLeadSelectionIndex sample code for javax.swing.DefaultListSelectionModel.getLeadSelectionIndex() definition code for javax.swing.DefaultListSelectionModel.getLeadSelectionIndex() ()
          Return the second index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
<T extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener >
T[]
getListeners sample code for javax.swing.DefaultListSelectionModel.getListeners(java.lang.Class) definition code for javax.swing.DefaultListSelectionModel.getListeners(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <T> listenerType)
          Returns an array of all the objects currently registered as FooListeners upon this model.
 ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener [] getListSelectionListeners sample code for javax.swing.DefaultListSelectionModel.getListSelectionListeners() definition code for javax.swing.DefaultListSelectionModel.getListSelectionListeners() ()
          Returns an array of all the list selection listeners registered on this DefaultListSelectionModel.
 int getMaxSelectionIndex sample code for javax.swing.DefaultListSelectionModel.getMaxSelectionIndex() definition code for javax.swing.DefaultListSelectionModel.getMaxSelectionIndex() ()
          Returns the last selected index or -1 if the selection is empty.
 int getMinSelectionIndex sample code for javax.swing.DefaultListSelectionModel.getMinSelectionIndex() definition code for javax.swing.DefaultListSelectionModel.getMinSelectionIndex() ()
          Returns the first selected index or -1 if the selection is empty.
 int getSelectionMode sample code for javax.swing.DefaultListSelectionModel.getSelectionMode() definition code for javax.swing.DefaultListSelectionModel.getSelectionMode() ()
          Returns the selection mode.
 boolean getValueIsAdjusting sample code for javax.swing.DefaultListSelectionModel.getValueIsAdjusting() definition code for javax.swing.DefaultListSelectionModel.getValueIsAdjusting() ()
          Returns true if the value is undergoing a series of changes.
 void insertIndexInterval sample code for javax.swing.DefaultListSelectionModel.insertIndexInterval(int, int, boolean) definition code for javax.swing.DefaultListSelectionModel.insertIndexInterval(int, int, boolean) (int index, int length, boolean before)
          Insert length indices beginning before/after index.
 boolean isLeadAnchorNotificationEnabled sample code for javax.swing.DefaultListSelectionModel.isLeadAnchorNotificationEnabled() definition code for javax.swing.DefaultListSelectionModel.isLeadAnchorNotificationEnabled() ()
          Returns the value of the leadAnchorNotificationEnabled flag.
 boolean isSelectedIndex sample code for javax.swing.DefaultListSelectionModel.isSelectedIndex(int) definition code for javax.swing.DefaultListSelectionModel.isSelectedIndex(int) (int index)
          Returns true if the specified index is selected.
 boolean isSelectionEmpty sample code for javax.swing.DefaultListSelectionModel.isSelectionEmpty() definition code for javax.swing.DefaultListSelectionModel.isSelectionEmpty() ()
          Returns true if no indices are selected.
 void moveLeadSelectionIndex sample code for javax.swing.DefaultListSelectionModel.moveLeadSelectionIndex(int) definition code for javax.swing.DefaultListSelectionModel.moveLeadSelectionIndex(int) (int leadIndex)
          Set the lead selection index, leaving all selection values unchanged.
 void removeIndexInterval sample code for javax.swing.DefaultListSelectionModel.removeIndexInterval(int, int) definition code for javax.swing.DefaultListSelectionModel.removeIndexInterval(int, int) (int index0, int index1)
          Remove the indices in the interval index0,index1 (inclusive) from the selection model.
 void removeListSelectionListener sample code for javax.swing.DefaultListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.DefaultListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) (ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener  l)
          Remove a listener from the list that's notified each time a change to the selection occurs.
 void removeSelectionInterval sample code for javax.swing.DefaultListSelectionModel.removeSelectionInterval(int, int) definition code for javax.swing.DefaultListSelectionModel.removeSelectionInterval(int, int) (int index0, int index1)
          Change the selection to be the set difference of the current selection and the indices between index0 and index1 inclusive.
 void setAnchorSelectionIndex sample code for javax.swing.DefaultListSelectionModel.setAnchorSelectionIndex(int) definition code for javax.swing.DefaultListSelectionModel.setAnchorSelectionIndex(int) (int anchorIndex)
          Set the anchor selection index, leaving all selection values unchanged.
 void setLeadAnchorNotificationEnabled sample code for javax.swing.DefaultListSelectionModel.setLeadAnchorNotificationEnabled(boolean) definition code for javax.swing.DefaultListSelectionModel.setLeadAnchorNotificationEnabled(boolean) (boolean flag)
          Sets the value of the leadAnchorNotificationEnabled flag.
 void setLeadSelectionIndex sample code for javax.swing.DefaultListSelectionModel.setLeadSelectionIndex(int) definition code for javax.swing.DefaultListSelectionModel.setLeadSelectionIndex(int) (int leadIndex)
          Sets the lead selection index, ensuring that values between the anchor and the new lead are either all selected or all deselected.
 void setSelectionInterval sample code for javax.swing.DefaultListSelectionModel.setSelectionInterval(int, int) definition code for javax.swing.DefaultListSelectionModel.setSelectionInterval(int, int) (int index0, int index1)
          Change the selection to be between index0 and index1 inclusive.
 void setSelectionMode sample code for javax.swing.DefaultListSelectionModel.setSelectionMode(int) definition code for javax.swing.DefaultListSelectionModel.setSelectionMode(int) (int selectionMode)
          Sets the selection mode.
 void setValueIsAdjusting sample code for javax.swing.DefaultListSelectionModel.setValueIsAdjusting(boolean) definition code for javax.swing.DefaultListSelectionModel.setValueIsAdjusting(boolean) (boolean isAdjusting)
          This property is true if upcoming changes to the value of the model should be considered a single event.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.swing.DefaultListSelectionModel.toString() definition code for javax.swing.DefaultListSelectionModel.toString() ()
          Returns a string that displays and identifies this object's properties.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

listenerList sample code for javax.swing.DefaultListSelectionModel.listenerList

protected EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList  listenerList

leadAnchorNotificationEnabled sample code for javax.swing.DefaultListSelectionModel.leadAnchorNotificationEnabled

protected boolean leadAnchorNotificationEnabled
Constructor Detail

DefaultListSelectionModel sample code for javax.swing.DefaultListSelectionModel() definition code for javax.swing.DefaultListSelectionModel()

public DefaultListSelectionModel()
Method Detail

getMinSelectionIndex sample code for javax.swing.DefaultListSelectionModel.getMinSelectionIndex() definition code for javax.swing.DefaultListSelectionModel.getMinSelectionIndex()

public int getMinSelectionIndex()
Description copied from interface: ListSelectionModel sample code for javax.swing.ListSelectionModel.getMinSelectionIndex() definition code for javax.swing.ListSelectionModel.getMinSelectionIndex()
Returns the first selected index or -1 if the selection is empty.

Specified by:
getMinSelectionIndex sample code for javax.swing.ListSelectionModel.getMinSelectionIndex() definition code for javax.swing.ListSelectionModel.getMinSelectionIndex() in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel

getMaxSelectionIndex sample code for javax.swing.DefaultListSelectionModel.getMaxSelectionIndex() definition code for javax.swing.DefaultListSelectionModel.getMaxSelectionIndex()

public int getMaxSelectionIndex()
Description copied from interface: ListSelectionModel sample code for javax.swing.ListSelectionModel.getMaxSelectionIndex() definition code for javax.swing.ListSelectionModel.getMaxSelectionIndex()
Returns the last selected index or -1 if the selection is empty.

Specified by:
getMaxSelectionIndex sample code for javax.swing.ListSelectionModel.getMaxSelectionIndex() definition code for javax.swing.ListSelectionModel.getMaxSelectionIndex() in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel

getValueIsAdjusting sample code for javax.swing.DefaultListSelectionModel.getValueIsAdjusting() definition code for javax.swing.DefaultListSelectionModel.getValueIsAdjusting()

public boolean getValueIsAdjusting()
Description copied from interface: ListSelectionModel sample code for javax.swing.ListSelectionModel.getValueIsAdjusting() definition code for javax.swing.ListSelectionModel.getValueIsAdjusting()
Returns true if the value is undergoing a series of changes.

Specified by:
getValueIsAdjusting sample code for javax.swing.ListSelectionModel.getValueIsAdjusting() definition code for javax.swing.ListSelectionModel.getValueIsAdjusting() in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel
Returns:
true if the value is currently adjusting
See Also:
ListSelectionModel.setValueIsAdjusting(boolean) sample code for javax.swing.ListSelectionModel.setValueIsAdjusting(boolean) definition code for javax.swing.ListSelectionModel.setValueIsAdjusting(boolean)

getSelectionMode sample code for javax.swing.DefaultListSelectionModel.getSelectionMode() definition code for javax.swing.DefaultListSelectionModel.getSelectionMode()

public int getSelectionMode()
Returns the selection mode.

Specified by:
getSelectionMode sample code for javax.swing.ListSelectionModel.getSelectionMode() definition code for javax.swing.ListSelectionModel.getSelectionMode() in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel
Returns:
one of the these values:
  • SINGLE_SELECTION
  • SINGLE_INTERVAL_SELECTION
  • MULTIPLE_INTERVAL_SELECTION
See Also:
getSelectionMode() sample code for javax.swing.DefaultListSelectionModel.getSelectionMode() definition code for javax.swing.DefaultListSelectionModel.getSelectionMode()

setSelectionMode sample code for javax.swing.DefaultListSelectionModel.setSelectionMode(int) definition code for javax.swing.DefaultListSelectionModel.setSelectionMode(int)

public void setSelectionMode(int selectionMode)
Sets the selection mode. The default is MULTIPLE_INTERVAL_SELECTION.

Specified by:
setSelectionMode sample code for javax.swing.ListSelectionModel.setSelectionMode(int) definition code for javax.swing.ListSelectionModel.setSelectionMode(int) in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel
Parameters:
selectionMode - one of three values:
  • SINGLE_SELECTION
  • SINGLE_INTERVAL_SELECTION
  • MULTIPLE_INTERVAL_SELECTION
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if selectionMode is not one of the legal values shown above
See Also:
setSelectionMode(int) sample code for javax.swing.DefaultListSelectionModel.setSelectionMode(int) definition code for javax.swing.DefaultListSelectionModel.setSelectionMode(int)

isSelectedIndex sample code for javax.swing.DefaultListSelectionModel.isSelectedIndex(int) definition code for javax.swing.DefaultListSelectionModel.isSelectedIndex(int)

public boolean isSelectedIndex(int index)
Description copied from interface: ListSelectionModel sample code for javax.swing.ListSelectionModel.isSelectedIndex(int) definition code for javax.swing.ListSelectionModel.isSelectedIndex(int)
Returns true if the specified index is selected.

Specified by:
isSelectedIndex sample code for javax.swing.ListSelectionModel.isSelectedIndex(int) definition code for javax.swing.ListSelectionModel.isSelectedIndex(int) in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel

isSelectionEmpty sample code for javax.swing.DefaultListSelectionModel.isSelectionEmpty() definition code for javax.swing.DefaultListSelectionModel.isSelectionEmpty()

public boolean isSelectionEmpty()
Description copied from interface: ListSelectionModel sample code for javax.swing.ListSelectionModel.isSelectionEmpty() definition code for javax.swing.ListSelectionModel.isSelectionEmpty()
Returns true if no indices are selected.

Specified by:
isSelectionEmpty sample code for javax.swing.ListSelectionModel.isSelectionEmpty() definition code for javax.swing.ListSelectionModel.isSelectionEmpty() in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel

addListSelectionListener sample code for javax.swing.DefaultListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.DefaultListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)

public void addListSelectionListener(ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener  l)
Description copied from interface: ListSelectionModel sample code for javax.swing.ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)
Add a listener to the list that's notified each time a change to the selection occurs.

Specified by:
addListSelectionListener sample code for javax.swing.ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel
Parameters:
l - the ListSelectionListener
See Also:
ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) sample code for javax.swing.ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) , ListSelectionModel.setSelectionInterval(int, int) sample code for javax.swing.ListSelectionModel.setSelectionInterval(int, int) definition code for javax.swing.ListSelectionModel.setSelectionInterval(int, int) , ListSelectionModel.addSelectionInterval(int, int) sample code for javax.swing.ListSelectionModel.addSelectionInterval(int, int) definition code for javax.swing.ListSelectionModel.addSelectionInterval(int, int) , ListSelectionModel.removeSelectionInterval(int, int) sample code for javax.swing.ListSelectionModel.removeSelectionInterval(int, int) definition code for javax.swing.ListSelectionModel.removeSelectionInterval(int, int) , ListSelectionModel.clearSelection() sample code for javax.swing.ListSelectionModel.clearSelection() definition code for javax.swing.ListSelectionModel.clearSelection() , ListSelectionModel.insertIndexInterval(int, int, boolean) sample code for javax.swing.ListSelectionModel.insertIndexInterval(int, int, boolean) definition code for javax.swing.ListSelectionModel.insertIndexInterval(int, int, boolean) , ListSelectionModel.removeIndexInterval(int, int) sample code for javax.swing.ListSelectionModel.removeIndexInterval(int, int) definition code for javax.swing.ListSelectionModel.removeIndexInterval(int, int)

removeListSelectionListener sample code for javax.swing.DefaultListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.DefaultListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener)

public void removeListSelectionListener(ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener  l)
Description copied from interface: ListSelectionModel sample code for javax.swing.ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener)
Remove a listener from the list that's notified each time a change to the selection occurs.

Specified by:
removeListSelectionListener sample code for javax.swing.ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.ListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) in interface ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.ListSelectionModel
Parameters:
l - the ListSelectionListener
See Also:
ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) sample code for javax.swing.ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.ListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener)

getListSelectionListeners sample code for javax.swing.DefaultListSelectionModel.getListSelectionListeners() definition code for javax.swing.DefaultListSelectionModel.getListSelectionListeners()

public ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener [] getListSelectionListeners()
Returns an array of all the list selection listeners registered on this DefaultListSelectionModel.

Returns:
all of this model's ListSelectionListeners or an empty array if no list selection listeners are currently registered
Since:
1.4
See Also:
addListSelectionListener(javax.swing.event.ListSelectionListener) sample code for javax.swing.DefaultListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.DefaultListSelectionModel.addListSelectionListener(javax.swing.event.ListSelectionListener) , removeListSelectionListener(javax.swing.event.ListSelectionListener) sample code for javax.swing.DefaultListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener) definition code for javax.swing.DefaultListSelectionModel.removeListSelectionListener(javax.swing.event.ListSelectionListener)

fireValueChanged sample code for javax.swing.DefaultListSelectionModel.fireValueChanged(boolean) definition code for javax.swing.DefaultListSelectionModel.fireValueChanged(boolean)

protected void fireValueChanged(boolean isAdjusting)
Notifies listeners that we have ended a series of adjustments.


fireValueChanged sample code for javax.swing.DefaultListSelectionModel.fireValueChanged(int, int) definition code for javax.swing.DefaultListSelectionModel.fireValueChanged(int, int)

protected void fireValueChanged(int firstIndex,
                                int lastIndex)
Notifies ListSelectionListeners that the value of the selection, in the closed interval firstIndex, lastIndex, has changed.


fireValueChanged sample code for javax.swing.DefaultListSelectionModel.fireValueChanged(int, int, boolean) definition code for javax.swing.DefaultListSelectionModel.fireValueChanged(int, int, boolean)

protected void fireValueChanged(int firstIndex,
                                int lastIndex,
                                boolean isAdjusting)
Parameters:
firstIndex - the first index in the interval
lastIndex - the last index in the interval
isAdjusting - true if this is the final change in a series of adjustments
See Also:
EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList

getListeners sample code for javax.swing.DefaultListSelectionModel.<T extends java.util.EventListener>getListeners(java.lang.Class<T>) definition code for javax.swing.DefaultListSelectionModel.<T extends java.util.EventListener>getListeners(java.lang.Class<T>)

public <T extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener > T[] getListeners(Class sample code for java.lang.Class definition code for java.lang.Class <T> listenerType)
Returns an array of all the objects currently registered as FooListeners upon this model. FooListeners are registered using the addFooListener method.

You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a DefaultListSelectionModel instance m for its list selection listeners with the following code:

ListSelectionListener[] lsls = (ListSelectionListener[])(m.getListeners(ListSelectionListener.class));
If no such listeners exist, this method returns an empty array.

Parameters:
listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
Returns:
an array of all objects registered as FooListeners on this model, or an empty array if no such listeners have been added
Throws:
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
Since:
1.3
See Also:
getListSelectionListeners() sample code for javax.swing.DefaultListSelectionModel.getListSelectionListeners() definition code for javax.swing.DefaultListSelectionModel.getListSelectionListeners()

setLeadAnchorNotificationEnabled sample code for javax.swing.DefaultListSelectionModel.setLeadAnchorNotificationEnabled(boolean) definition code for javax.swing.DefaultListSelectionModel.setLeadAnchorNotificationEnabled(boolean)

public void setLeadAnchorNotificationEnabled(boolean flag)
Sets the value of the leadAnchorNotificationEnabled flag.

See Also:
isLeadAnchorNotificationEnabled() sample code for javax.swing.DefaultListSelectionModel.isLeadAnchorNotificationEnabled() definition code for javax.swing.DefaultListSelectionModel.isLeadAnchorNotificationEnabled()

isLeadAnchorNotificationEnabled sample code for javax.swing.DefaultListSelectionModel.isLeadAnchorNotificationEnabled()