public class VetoableChangeListenerProxy extends EventListenerProxy implements VetoableChangeListener
VetoableChangeListener
-
associating a name with the listener. This can be used to filter the
changes that one is interested in.Constructor and Description |
---|
VetoableChangeListenerProxy(String propertyName,
VetoableChangeListener listener)
Create a new proxy which filters property change events and only passes
changes to the named property on to the delegate.
|
Modifier and Type | Method and Description |
---|---|
String |
getPropertyName()
Gets the name of the property this proxy is filtering on.
|
void |
vetoableChange(PropertyChangeEvent event)
Forwards the event on to the delegate if the property name matches.
|
getListener
public VetoableChangeListenerProxy(String propertyName, VetoableChangeListener listener)
propertyName
- the property's name to filter onlistener
- the delegate listenerpublic void vetoableChange(PropertyChangeEvent event) throws PropertyVetoException
vetoableChange
in interface VetoableChangeListener
event
- the event to pass on, if it meets the filterNullPointerException
- if the delegate this was created with is nullPropertyVetoException
- if the change is vetoed by the listenerpublic String getPropertyName()