Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.util
Class PropertyChangeNotifier

java.lang.Object
  extended by net.java.sip.communicator.util.PropertyChangeNotifier
Direct Known Subclasses:
AbstractCallPeer, AbstractConferenceMember, CallPeerMediaHandler, DeviceConfiguration, MediaDeviceSession

public class PropertyChangeNotifier
extends Object

Represents a source of PropertyChangeEvents which notifies PropertyChangeListeners about changes in the values of properties.

Author:
Lubomir Marinov

Constructor Summary
PropertyChangeNotifier()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a specific PropertyChangeListener to the list of listeners interested in and notified about changes in the values of the properties of this PropertyChangeNotifier.
protected  void firePropertyChange(String property, Object oldValue, Object newValue)
          Fires a new PropertyChangeEvent to the PropertyChangeListeners registered with this PropertyChangeNotifier in order to notify about a change in the value of a specific property which had its old value modified to a specific new value.
protected  Object getPropertyChangeSource(String property, Object oldValue, Object newValue)
          Gets the Object to be reported as the source of a new PropertyChangeEvent which is to notify the PropertyChangeListeners registered with this PropertyChangeNotifier about the change in the value of a property with a specific name from a specific old value to a specific new value.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a specific PropertyChangeListener from the list of listeners interested in and notified about changes in the values of the properties of this PropertyChangeNotifer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyChangeNotifier

public PropertyChangeNotifier()
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a specific PropertyChangeListener to the list of listeners interested in and notified about changes in the values of the properties of this PropertyChangeNotifier.

Parameters:
listener - a PropertyChangeListener to be notified about changes in the values of the properties of this PropertyChangeNotifier. If the specified listener is already in the list of interested listeners (i.e. it has been previously added), it is not added again.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a specific PropertyChangeListener from the list of listeners interested in and notified about changes in the values of the properties of this PropertyChangeNotifer.

Parameters:
listener - a PropertyChangeListener to no longer be notified about changes in the values of the properties of this PropertyChangeNotifier

firePropertyChange

protected void firePropertyChange(String property,
                                  Object oldValue,
                                  Object newValue)
Fires a new PropertyChangeEvent to the PropertyChangeListeners registered with this PropertyChangeNotifier in order to notify about a change in the value of a specific property which had its old value modified to a specific new value.

Parameters:
property - the name of the property of this PropertyChangeNotifier which had its value changed
oldValue - the value of the property with the specified name before the change
newValue - the value of the property with the specified name after the change

getPropertyChangeSource

protected Object getPropertyChangeSource(String property,
                                         Object oldValue,
                                         Object newValue)
Gets the Object to be reported as the source of a new PropertyChangeEvent which is to notify the PropertyChangeListeners registered with this PropertyChangeNotifier about the change in the value of a property with a specific name from a specific old value to a specific new value.

Parameters:
property - the name of the property which had its value changed from the specified old value to the specified new value
oldValue - the value of the property with the specified name before the change
newValue - the value of the property with the specified name after the change
Returns:
the Object to be reported as the source of the new PropertyChangeEvent which is to notify the PropertyChangeListeners registered with this PropertyChangeNotifier about the change in the value of the property with the specified name from the specified old value to the specified new value

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.