public class ListSelectionEvent extends EventObject
ListSelectionModel
) and the range of items in the
list that have potentially changed their selection status.source
Constructor and Description |
---|
ListSelectionEvent(Object source,
int firstIndex,
int lastIndex,
boolean isAdjusting)
Creates a new
ListSelectionEvent . |
Modifier and Type | Method and Description |
---|---|
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.
|
getSource
public ListSelectionEvent(Object source, int firstIndex, int lastIndex, boolean isAdjusting)
ListSelectionEvent
.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.IllegalArgumentException
- if source
is
null
.public int getFirstIndex()
public int getLastIndex()
public boolean getValueIsAdjusting()
public String toString()
toString
in class EventObject
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)