public class PropertyChangeListenerProxy extends EventListenerProxy<PropertyChangeListener> implements PropertyChangeListener
EventListenerProxy
专门用于添加PropertyChangeListener
具有“绑定”属性。
该类的实例可以作为PropertyChangeListener
添加到支持触发属性更改事件的bean。
如果对象具有getPropertyChangeListeners
方法,则返回的数组可能是PropertyChangeListener
和PropertyChangeListenerProxy
对象的混合。
EventListenerProxy
, PropertyChangeSupport.getPropertyChangeListeners()
Constructor and Description |
---|
PropertyChangeListenerProxy(String propertyName, PropertyChangeListener listener)
将PropertyChangeListener绑定到特定属性的
PropertyChangeListener 。
|
Modifier and Type | Method and Description |
---|---|
String |
getPropertyName()
返回与侦听器关联的命名属性的名称。
|
void |
propertyChange(PropertyChangeEvent event)
将属性更改事件转发给侦听器代理。
|
getListener
public PropertyChangeListenerProxy(String propertyName, PropertyChangeListener listener)
PropertyChangeListener
。
propertyName
- 要监听的属性的名称
listener
- 侦听器对象
public void propertyChange(PropertyChangeEvent event)
propertyChange
在界面
PropertyChangeListener
event
- 财产变更事件
public String getPropertyName()
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.