diff options
author | Yana Stamcheva <yana@jitsi.org> | 2006-02-05 19:32:01 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2006-02-05 19:32:01 +0000 |
commit | a3b812f62fcd5cea50bb72e29fd3ee24abb12468 (patch) | |
tree | 6c99456436f08e09efdfc3645bd5addcee9a1dfb /src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java | |
parent | 61fada7f4aa33ce68998ea685798491ecacbfd30 (diff) | |
download | jitsi-a3b812f62fcd5cea50bb72e29fd3ee24abb12468.zip jitsi-a3b812f62fcd5cea50bb72e29fd3ee24abb12468.tar.gz jitsi-a3b812f62fcd5cea50bb72e29fd3ee24abb12468.tar.bz2 |
contactlist
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java new file mode 100644 index 0000000..2121f7c --- /dev/null +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java @@ -0,0 +1,55 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ + +package net.java.sip.communicator.impl.gui.main.contactlist; + +import java.awt.Cursor; + +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.TreeNode; + +import net.java.sip.communicator.impl.gui.main.ContactItem; +import net.java.sip.communicator.impl.gui.main.GroupItem; + +public class ContactNode extends DefaultMutableTreeNode { + + private boolean leafExpanded = false; + + public ContactNode(){ + + } + + public ContactNode(Object userObject){ + super(userObject); + } + + public String toString() { + + String result = ""; + + if (userObject == null) { + return null; + } else { + //TODO: to replace ContactItem with MetaContact and GroupItem with MetaGroup + if (userObject instanceof ContactItem) + result = ((ContactItem)userObject).getNickName(); + else if (userObject instanceof GroupItem) + result = ((GroupItem)userObject).getGroupName(); + } + + return result; + } + + public boolean isLeafExpanded() { + return leafExpanded; + } + + public void setLeafExpanded(boolean leafExpanded) { + this.leafExpanded = leafExpanded; + } + +} |