javax.swing.event
Class ListSelectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.swing.event.ListSelectionEvent
All Implemented Interfaces:
Serializable

public class ListSelectionEvent
extends EventObject

An event that indicates a change to a list selection, including the source of the change (a ListSelectionModel) and the range of items in the list that have potentially changed their selection status.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ListSelectionEvent(Object source, int firstIndex, int lastIndex, boolean isAdjusting)
          Creates a new ListSelectionEvent.
 
Method Summary
 int getFirstIndex()
          Returns the first index.
 int getLastIndex()
          Returns the last index.
 boolean getValueIsAdjusting()
          Returns the flag that indicates that this event is one in a series of events updating a selection.
 String toString()
          Returns a string representation of the event, typically used for debugging purposes.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListSelectionEvent

public ListSelectionEvent(Object source,
                          int firstIndex,
                          int lastIndex,
                          boolean isAdjusting)
Creates a new ListSelectionEvent.

Parameters:
source - the event source (null not permitted).
firstIndex - the first index.
lastIndex - the last index.
isAdjusting - a flag indicating that this event is one in a series of events updating a selection.
Throws:
IllegalArgumentException - if source is null.
Method Detail

getFirstIndex

public int getFirstIndex()
Returns the first index.

Returns:
The first index.

getLastIndex

public int getLastIndex()
Returns the last index.

Returns:
The last index.

getValueIsAdjusting

public boolean getValueIsAdjusting()
Returns the flag that indicates that this event is one in a series of events updating a selection.

Returns:
A boolean.

toString

public String toString()
Returns a string representation of the event, typically used for debugging purposes.

Overrides:
toString in class EventObject
Returns:
A string representation of the event.
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)