All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.dip.PropertyChangeSupport

java.lang.Object
   |
   +----com.ibm.beans.dip.PropertyChangeSupport

public class PropertyChangeSupport
extends Object
implements Serializable
This utility class is based on java.beans.PropertyChangeSupport. The main difference between java.beans.PropertyChangeSupport and this class is that this class supports using com.ibm.beans.util.Collections to hold the listeners instead of being hardcoded to use only a Vector class. Also, the isEmpty() and elements() methods were added to this class to allow the user to see when listeners were added.

See Also:
PropertyChangeSupport

Constructor Index

 o PropertyChangeSupport(Object)
Constructs a PropertyChangeSupport instance using the default Vector implementation.
 o PropertyChangeSupport(Object, Collection)
Constructs a PropertyChangeSupport instance using the input Collection.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener instance to the listener list.
 o elements()
Gets an enumeration of PropertyChangeListener instances.
 o firePropertyChange(String, Object, Object)
Reports a bound property update to any registered listeners.
 o isEmpty()
Checks to see if the collection of listeners is empty.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a PropertyChangeListener instance from the listener list.

Constructors

 o PropertyChangeSupport
 public PropertyChangeSupport(Object sourceBean)
Constructs a PropertyChangeSupport instance using the default Vector implementation.

Parameters:
sourceBean - The bean given as the source for any event.
 o PropertyChangeSupport
 public PropertyChangeSupport(Object sourceBean,
                              Collection collection)
Constructs a PropertyChangeSupport instance using the input Collection.

Parameters:
sourceBean - The bean given as the source for any event.
collection - The Collection used to store the listeners.

Methods

 o addPropertyChangeListener
 public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener instance to the listener list.

Parameters:
listener - The listener to add.
 o removePropertyChangeListener
 public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener instance from the listener list.

Parameters:
listener - The listener to remove.
 o firePropertyChange
 public void firePropertyChange(String propertyName,
                                Object oldValue,
                                Object newValue)
Reports a bound property update to any registered listeners. No event is fired if the old and new values are equal and non-null.

Parameters:
propertyName - The programmatic name of the changed property.
oldValue - The old value of the property.
newValue - The new value of the property.
 o elements
 public final synchronized Enumeration elements()
Gets an enumeration of PropertyChangeListener instances. Use the Enumeration methods on the returned object to fetch the elements sequentially.

Returns:
An enumeration of the listeners that will be fired in the firePropertyChange() method.
 o isEmpty
 public final boolean isEmpty()
Checks to see if the collection of listeners is empty.

Returns:
true if empty; false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index