public class ListSelectionEvent extends EventObject
ListSelectionModel实施将保持尽可能小的范围内。
ListSelectionListeners一般查询的新选的每个状态可能改变行的事件源。
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans包。请看XMLEncoder。
ListSelectionModel
source| Constructor and Description |
|---|
ListSelectionEvent(Object source, int firstIndex, int lastIndex, boolean isAdjusting)
代表
firstIndex和
lastIndex之间选择状态改变,包容。
|
| Modifier and Type | Method and Description |
|---|---|
int |
getFirstIndex()
返回选择可能已更改的第一行的索引。
|
int |
getLastIndex()
返回选择可能已更改的最后一行的索引。
|
boolean |
getValueIsAdjusting()
返回是否这是一个在一系列的多个事件,其中的变化仍在作出。
|
String |
toString()
返回一个
String显示和识别该对象的属性。
|
getSourcepublic ListSelectionEvent(Object source, int firstIndex, int lastIndex, boolean isAdjusting)
firstIndex和
lastIndex之间选择状态改变,包容。
firstIndex小于或等于
lastIndex。在范围内的至少一个索引的选择将发生改变。
firstIndex -范围内的第一个指数,<= lastIndex
lastIndex -范围内的最后一个索引,> =美国福斯特英德克斯
isAdjusting -这是否是一个系列的多个事件,那里的变化仍在进行
public int getFirstIndex()
getFirstIndex() <= getLastIndex()
public int getLastIndex()
getLastIndex() >= getFirstIndex()
public boolean getValueIsAdjusting()
ListSelectionModel.setValueIsAdjusting(boolean)更多细节运用。
true如果这是一个系列的多个事件,那里的变化仍在进行
public String toString()
String显示和识别该对象的属性。
toString 方法重写,继承类
EventObject
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.