Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.contactlist.event
Class MetaContactEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.service.contactlist.event.MetaContactEvent
All Implemented Interfaces:
Serializable

public class MetaContactEvent
extends EventObject

Parent class for meta contact events indicating addition and removal of meta contacts in a meta contact list.

Author:
Yana Stamcheva, Emil Ivov
See Also:
Serialized Form

Field Summary
static int META_CONTACT_ADDED
          Indicates that the MetaContactEvent instance was triggered by adding a MetaContact.
static int META_CONTACT_MOVED
          Indicates that the MetaContactEvent instance was triggered by moving an existing MetaContact.
static int META_CONTACT_REMOVED
          Indicates that the MetaContactEvent instance was triggered by the removal of an existing MetaContact.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MetaContactEvent(MetaContact source, MetaContactGroup parentGroup, int eventID)
          Creates a new MetaContact event according to the specified parameters.
 
Method Summary
 int getEventID()
          Returns an event id specifying whether the type of this event (e.g.
 MetaContactGroup getParentGroup()
          Returns the MetaContactGroup that the MetaContact belongs to.
 MetaContact getSourceMetaContact()
          Returns the source MetaContact.
 String toString()
          Returns a String representation of this MetaContactEvent
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

META_CONTACT_ADDED

public static final int META_CONTACT_ADDED
Indicates that the MetaContactEvent instance was triggered by adding a MetaContact.

See Also:
Constant Field Values

META_CONTACT_REMOVED

public static final int META_CONTACT_REMOVED
Indicates that the MetaContactEvent instance was triggered by the removal of an existing MetaContact.

See Also:
Constant Field Values

META_CONTACT_MOVED

public static final int META_CONTACT_MOVED
Indicates that the MetaContactEvent instance was triggered by moving an existing MetaContact.

See Also:
Constant Field Values
Constructor Detail

MetaContactEvent

public MetaContactEvent(MetaContact source,
                        MetaContactGroup parentGroup,
                        int eventID)
Creates a new MetaContact event according to the specified parameters.

Parameters:
source - the MetaContact instance that is added to the MetaContactList
parentGroup - the MetaContactGroup underwhich the corresponding MetaContact is located
eventID - one of the METACONTACT_XXX static fields indicating the nature of the event.
Method Detail

getSourceMetaContact

public MetaContact getSourceMetaContact()
Returns the source MetaContact.

Returns:
the source MetaContact.

getParentGroup

public MetaContactGroup getParentGroup()
Returns the MetaContactGroup that the MetaContact belongs to.

Returns:
the MetaContactGroup that the MetaContact belongs to.

toString

public String toString()
Returns a String representation of this MetaContactEvent

Overrides:
toString in class EventObject
Returns:
A String representation of this MetaContactListEvent.

getEventID

public int getEventID()
Returns an event id specifying whether the type of this event (e.g. METACONTACT_ADDED, METACONTACT_REMOVED and etc.)

Returns:
one of the METACONTACT_XXX int fields of this class.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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