Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by net.java.sip.communicator.impl.gui.main.contactlist.ContactNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode, ContactListNode

public class ContactNode
extends DefaultMutableTreeNode
implements ContactListNode

The ContactNode is a ContactListNode corresponding to a given UIContact.

Author:
Yana Stamcheva
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
ContactNode(UIContact contact)
          Creates a ContactNode by specifying the corresponding contact.
 
Method Summary
 UIContact getContactDescriptor()
          Returns the corresponding UIContact.
 int getSourceIndex()
          Returns the index of this contact node in its parent group.
 boolean isActive()
          Returns true if this contact node has unread received messages waiting, otherwise returns false.
 void setActive(boolean isActive)
          Sets this contact node as active, which indicates it has unread received messages waiting.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContactNode

public ContactNode(UIContact contact)
Creates a ContactNode by specifying the corresponding contact.

Parameters:
contact - the UIContact corresponding to this node
Method Detail

getContactDescriptor

public UIContact getContactDescriptor()
Returns the corresponding UIContact.

Returns:
the corresponding UIContact

getSourceIndex

public int getSourceIndex()
Returns the index of this contact node in its parent group.

Specified by:
getSourceIndex in interface ContactListNode
Returns:
the index of this contact node in its parent group

isActive

public boolean isActive()
Returns true if this contact node has unread received messages waiting, otherwise returns false.

Returns:
true if this contact node has unread received messages waiting, otherwise returns false

setActive

public void setActive(boolean isActive)
Sets this contact node as active, which indicates it has unread received messages waiting.

Parameters:
isActive - indicates if this contact is active

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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