Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.contactlist
Class ContactListEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.impl.gui.main.contactlist.ContactListEvent
All Implemented Interfaces:
Serializable

public class ContactListEvent
extends EventObject

The ContactListEvent is triggered when a contact or a group is clicked in the contact list.

Author:
Yana Stamcheva
See Also:
Serialized Form

Field Summary
static int CONTACT_CLICKED
          Indicates that the ContactListEvent instance was triggered by selecting a contact in the contact list.
static int GROUP_CLICKED
          Indicates that the ContactListEvent instance was triggered by selecting a group in the contact list.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ContactListEvent(Object source, int eventID, int clickCount)
          Creates a new ContactListEvent according to the specified parameters.
 
Method Summary
 int getClickCount()
          Returns the number of click of this event.
 int getEventID()
          Returns an event id specifying whether the type of this event (CONTACT_SELECTED or PROTOCOL_CONTACT_SELECTED)
 UIContact getSourceContact()
          Returns the UIContactDescriptor for which this event occured.
 UIGroup getSourceGroup()
          Returns the UIGroupDescriptor for which this event occured.
 
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

CONTACT_CLICKED

public static final int CONTACT_CLICKED
Indicates that the ContactListEvent instance was triggered by selecting a contact in the contact list.

See Also:
Constant Field Values

GROUP_CLICKED

public static final int GROUP_CLICKED
Indicates that the ContactListEvent instance was triggered by selecting a group in the contact list.

See Also:
Constant Field Values
Constructor Detail

ContactListEvent

public ContactListEvent(Object source,
                        int eventID,
                        int clickCount)
Creates a new ContactListEvent according to the specified parameters.

Parameters:
source - the MetaContact which was selected
eventID - one of the XXX_SELECTED static fields indicating the nature of the event.
clickCount - the number of clicks that was produced when clicking over the contact list
Method Detail

getEventID

public int getEventID()
Returns an event id specifying whether the type of this event (CONTACT_SELECTED or PROTOCOL_CONTACT_SELECTED)

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

getSourceContact

public UIContact getSourceContact()
Returns the UIContactDescriptor for which this event occured.

Returns:
the UIContactDescriptor for which this event occured

getSourceGroup

public UIGroup getSourceGroup()
Returns the UIGroupDescriptor for which this event occured.

Returns:
the UIGroupDescriptor for which this event occured

getClickCount

public int getClickCount()
Returns the number of click of this event.

Returns:
the number of click of this event.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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