Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.event
Class ContactPropertyChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.beans.PropertyChangeEvent
          extended by net.java.sip.communicator.service.protocol.event.ContactPropertyChangeEvent
All Implemented Interfaces:
Serializable

public class ContactPropertyChangeEvent
extends PropertyChangeEvent

A Contact property change event is issued whenever a contact property has changed. Event codes defined in this class describe properties whose changes are being announced through this event.

Author:
Emil Ivov
See Also:
Serialized Form

Field Summary
static String PROPERTY_DISPLAY_NAME
          Indicates that a change has occurred in the display name of the source contact.
static String PROPERTY_IMAGE
          Indicates that a change has occurred in the image of the source contact.
static String PROPERTY_PERSISTENT_DATA
          Indicates that a change has occurred in the data that the contact is storing in external sources.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ContactPropertyChangeEvent(Contact source, String propertyName, Object oldValue, Object newValue)
          Creates a ContactPropertyChangeEvent indicating that a change has occurred for property propertyName in the source contact and that its value has changed from oldValue to newValue.
 
Method Summary
 ContactGroup getParentContactGroup()
          Returns a reference to the source contact parent ContactGroup.
 ProtocolProviderService getProtocolProvider()
          Returns a reference to the protocol provider where the event has originated.
 Contact getSourceContact()
          Returns a reference to the Contact whose property has changed.
 
Methods inherited from class java.beans.PropertyChangeEvent
getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_DISPLAY_NAME

public static final String PROPERTY_DISPLAY_NAME
Indicates that a change has occurred in the display name of the source contact.

See Also:
Constant Field Values

PROPERTY_IMAGE

public static final String PROPERTY_IMAGE
Indicates that a change has occurred in the image of the source contact.

See Also:
Constant Field Values

PROPERTY_PERSISTENT_DATA

public static final String PROPERTY_PERSISTENT_DATA
Indicates that a change has occurred in the data that the contact is storing in external sources.

See Also:
Constant Field Values
Constructor Detail

ContactPropertyChangeEvent

public ContactPropertyChangeEvent(Contact source,
                                  String propertyName,
                                  Object oldValue,
                                  Object newValue)
Creates a ContactPropertyChangeEvent indicating that a change has occurred for property propertyName in the source contact and that its value has changed from oldValue to newValue.

Parameters:
source - the Contact whose property has changed.
propertyName - the name of the property that has changed.
oldValue - the value of the property before the change occurred.
newValue - the value of the property after the change occurred.
Method Detail

getSourceContact

public Contact getSourceContact()
Returns a reference to the Contact whose property has changed.

Returns:
a reference to the Contact whose reference has changed.

getProtocolProvider

public ProtocolProviderService getProtocolProvider()
Returns a reference to the protocol provider where the event has originated.

Returns:
a reference to the ProtocolProviderService instance where this event originated.

getParentContactGroup

public ContactGroup getParentContactGroup()
Returns a reference to the source contact parent ContactGroup.

Returns:
a reference to the ContactGroup instance that contains the source Contact.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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