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