diff options
author | Yana Stamcheva <yana@jitsi.org> | 2006-02-24 10:35:33 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2006-02-24 10:35:33 +0000 |
commit | d0664f23e7bbbb075d657e951421bd1968316325 (patch) | |
tree | 664ade47149582f56454d49b2ef69d1d0d479de9 /src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java | |
parent | dfb17472bd485fd41ea0ba8db32572f36998c3a0 (diff) | |
download | jitsi-d0664f23e7bbbb075d657e951421bd1968316325.zip jitsi-d0664f23e7bbbb075d657e951421bd1968316325.tar.gz jitsi-d0664f23e7bbbb075d657e951421bd1968316325.tar.bz2 |
Change all contactlist related components to get theirs data from the MetaContactList
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 | 21 |
1 files changed, 10 insertions, 11 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 index 2121f7c..0648fb3 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactNode.java @@ -7,13 +7,10 @@ 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; +import net.java.sip.communicator.service.contactlist.MetaContact; +import net.java.sip.communicator.service.contactlist.MetaContactGroup; public class ContactNode extends DefaultMutableTreeNode { @@ -32,13 +29,15 @@ public class ContactNode extends DefaultMutableTreeNode { String result = ""; if (userObject == null) { - return 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(); + + if (userObject instanceof MetaContact) + result = ((MetaContact)userObject).getDisplayName(); + else if (userObject instanceof MetaContactGroup) + result = ((MetaContactGroup)userObject).getGroupName(); } return result; |