edu.neu.ccs.gui
Class PropertyChangeForwardingListener

java.lang.Object
  extended byedu.neu.ccs.gui.PropertyChangeForwardingListener
All Implemented Interfaces:
EventListener, PropertyChangeListener

public class PropertyChangeForwardingListener
extends Object
implements PropertyChangeListener

A PropertyChangeForwardingListener is a PropertyChangeListener that forwards a PropertyChangeEvent event that it receives to an object that implements the interface SupportsPropertyChange by causing that object to fire the same event to its own listeners.

This class is intended to permit PropertyChangeEvent events that are fired within a composite object to be handled by the listeners for the entire object.

More generally, this class may be used to forward events to any appropriate object that implements the interface SupportsPropertyChange.

Since:
2.3
Version:
2.3

Field Summary
private  SupportsPropertyChange spc
          The object to which events will be forwarded.
 
Constructor Summary
PropertyChangeForwardingListener(SupportsPropertyChange spc)
          The constructor that sets the associated object that implements SupportsPropertyChange.
 
Method Summary
 SupportsPropertyChange getSupportsPropertyChange()
          Returns the object that implements SupportsPropertyChange.
 void propertyChange(PropertyChangeEvent evt)
          Handles the given PropertyChangeEvent by firing a property change for the SupportsPropertyChange object referenced by this listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spc

private SupportsPropertyChange spc
The object to which events will be forwarded.

Constructor Detail

PropertyChangeForwardingListener

public PropertyChangeForwardingListener(SupportsPropertyChange spc)
The constructor that sets the associated object that implements SupportsPropertyChange.

Method Detail

getSupportsPropertyChange

public final SupportsPropertyChange getSupportsPropertyChange()
Returns the object that implements SupportsPropertyChange.

Returns:
the object that implements SupportsPropertyChange

propertyChange

public final void propertyChange(PropertyChangeEvent evt)
Handles the given PropertyChangeEvent by firing a property change for the SupportsPropertyChange object referenced by this listener.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
evt - the PropertyChangeEvent that triggers this method