public class IndexedPropertyChangeEvent
extends PropertyChangeEvent
java.lang.Object | |||
↳ | java.util.EventObject | ||
↳ | java.beans.PropertyChangeEvent | ||
↳ | java.beans.IndexedPropertyChangeEvent |
只要符合JavaBeans™规范的组件(“bean”)更改绑定的索引属性,就会传递“IndexedPropertyChange”事件。 此类是PropertyChangeEvent
的扩展,但包含已更改的属性的索引。
如果它们的真实值未知,则可以为旧值和新值提供空值。
事件源可能会发送一个空对象作为名称,以指示任意一组属性是否已更改。 在这种情况下,旧值和新值也应该为空。
Inherited fields |
---|
From class java.util.EventObject
|
Public constructors |
|
---|---|
IndexedPropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue, int index) 构造一个新的 |
Public methods |
|
---|---|
int |
getIndex() 获取已更改的属性的索引。 |
Inherited methods |
|
---|---|
From class java.beans.PropertyChangeEvent
|
|
From class java.util.EventObject
|
|
From class java.lang.Object
|
IndexedPropertyChangeEvent (Object source, String propertyName, Object oldValue, Object newValue, int index)
构造一个新的 IndexedPropertyChangeEvent
对象。
Parameters | |
---|---|
source |
Object : The bean that fired the event. |
propertyName |
String : The programmatic name of the property that was changed. |
oldValue |
Object : The old value of the property. |
newValue |
Object : The new value of the property. |
index |
int : index of the property element that was changed. |
int getIndex ()
获取已更改的属性的索引。
Returns | |
---|---|
int |
The index specifying the property element that was changed. |