public class ListDataEvent extends EventObject
警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对所有JavaBeans的长期存储的支持已经添加到java.beans包中。 请参阅XMLEncoder 。
| Modifier and Type | Field and Description |
|---|---|
static int |
CONTENTS_CHANGED
标识列表内容中的一个或多个更改。
|
static int |
INTERVAL_ADDED
标识列表中添加一个或多个连续项
|
static int |
INTERVAL_REMOVED
标识从列表中删除一个或多个连续项
|
source| Constructor and Description |
|---|
ListDataEvent(Object source, int type, int index0, int index1)
构造一个ListDataEvent对象。
|
public static final int CONTENTS_CHANGED
public static final int INTERVAL_ADDED
public static final int INTERVAL_REMOVED
public ListDataEvent(Object source, int type, int index0, int index1)
source - 源对象(通常为
this )
type -一个int,指定
CONTENTS_CHANGED ,
INTERVAL_ADDED ,或
INTERVAL_REMOVED
index0 - 新区间的一端
index1 - 新间隔的另一端
public int getType()
public int getIndex0()
getIndex1()返回的值相同。
public int getIndex1()
getIndex0()返回的值相同。
public String toString()
null 。
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.