APIdia Launch Partner
Top Description Fields Constructors Methods
java.beans

public Class VetoableChangeListenerProxy

extends EventListenerProxy<VetoableChangeListener>
implements VetoableChangeListener
Class Inheritance
All Implemented Interfaces
java.beans.VetoableChangeListener, java.util.EventListener
Imports
java.util.EventListenerProxy

A class which extends the EventListenerProxy specifically for adding a VetoableChangeListener with a "constrained" property. Instances of this class can be added as VetoableChangeListeners to a bean which supports firing vetoable change events.

If the object has a getVetoableChangeListeners method then the array returned could be a mixture of VetoableChangeListener and VetoableChangeListenerProxy objects.

Since
1.4
See Also
java.util.EventListenerProxy, VetoableChangeSupport#getVetoableChangeListeners

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
VetoableChangeListenerProxy(String
the name of the property to listen on
propertyName
,
VetoableChangeListener
the listener object
listener
)

Constructor which binds the VetoableChangeListener to a specific property.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the name of the named property associated with the listener
getPropertyName
()

Returns the name of the named property associated with the listener.

public void
vetoableChange(PropertyChangeEvent
the property change event
event
)

Implements java.beans.VetoableChangeListener.vetoableChange.

Forwards the property change event to the listener delegate.

Inherited from java.util.EventListenerProxy:
getListener

Field Detail

propertyNameback to summary
private final String propertyName

Constructor Detail

VetoableChangeListenerProxyback to summary
public VetoableChangeListenerProxy(String propertyName, VetoableChangeListener listener)

Constructor which binds the VetoableChangeListener to a specific property.

Parameters
propertyName:String

the name of the property to listen on

listener:VetoableChangeListener

the listener object

Method Detail

getPropertyNameback to summary
public String getPropertyName()

Returns the name of the named property associated with the listener.

Returns:String

the name of the named property associated with the listener

vetoableChangeback to summary
public void vetoableChange(PropertyChangeEvent event) throws PropertyVetoException

Implements java.beans.VetoableChangeListener.vetoableChange.

Forwards the property change event to the listener delegate.

Parameters
event:PropertyChangeEvent

the property change event

Annotations
@Override
Exceptions
PropertyVetoException:
if the recipient wishes the property change to be rolled back