org.exoplatform.social.client.core.util
Class PropertyChangeSupport

java.lang.Object
  extended by org.exoplatform.social.client.core.util.PropertyChangeSupport

public final class PropertyChangeSupport
extends Object

This is a utility class that can be used by models that support bound properties. You can use an instance of this class as a member field of your bean and delegate various work to it.

Author:
thanh_vucong

Constructor Summary
PropertyChangeSupport(Model source)
          Constructs a new PropertyChangeSupport object associated with the specified Model object.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChange event listener to this component.
 PropertyChangeListener[] findPropertyChangeListeners()
          Gets the lifecycle listeners associated with this lifecycle.
 void propertyChange(String propertyName, Object oldValue, Object newValue)
          Notifies all PropertyChange event listeners that a particular event has occurred for this Container.
 void removeLifecycleListener(PropertyChangeListener listener)
          Removes a PropertyChange event listener which was registered to model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyChangeSupport

public PropertyChangeSupport(Model source)
Constructs a new PropertyChangeSupport object associated with the specified Model object.

Parameters:
source -
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChange event listener to this component.

Parameters:
listener - The listener is added.

propertyChange

public void propertyChange(String propertyName,
                           Object oldValue,
                           Object newValue)
Notifies all PropertyChange event listeners that a particular event has occurred for this Container. The default implementation performs this notification synchronously using the calling thread. No event is fired if old and new are equal and non-null.

Parameters:
propertyName - The PropertyName string
oldValue - oldValue object.
newValue - newValue object.

removeLifecycleListener

public void removeLifecycleListener(PropertyChangeListener listener)
Removes a PropertyChange event listener which was registered to model

Parameters:
listener - The listener will be removed.

findPropertyChangeListeners

public PropertyChangeListener[] findPropertyChangeListeners()
Gets the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.



Copyright © 2011 eXo Platform. All Rights Reserved.