java.beans
public class: PropertyChangeListenerProxy [javadoc |
source]
java.lang.Object
java.util.EventListenerProxy
java.beans.PropertyChangeListenerProxy
All Implemented Interfaces:
PropertyChangeListener, EventListener
A class which extends the {@code EventListenerProxy}
specifically for adding a {@code PropertyChangeListener}
with a "bound" property.
Instances of this class can be added
as {@code PropertyChangeListener}s to a bean
which supports firing property change events.
If the object has a {@code getPropertyChangeListeners} method
then the array returned could be a mixture of {@code PropertyChangeListener}
and {@code PropertyChangeListenerProxy} objects.
| Constructor: |
public PropertyChangeListenerProxy(String propertyName,
PropertyChangeListener listener) {
super(listener);
this.propertyName = propertyName;
}
Constructor which binds the {@code PropertyChangeListener}
to a specific property. Parameters:
propertyName - the name of the property to listen on
listener - the listener object
|
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from java.beans.PropertyChangeListenerProxy Detail: |
public String getPropertyName() {
return this.propertyName;
}
Returns the name of the named property associated with the listener. |
public void propertyChange(PropertyChangeEvent event) {
getListener().propertyChange(event);
}
Forwards the property change event to the listener delegate. |