diff options
author | Yana Stamcheva <yana@jitsi.org> | 2007-03-12 17:41:01 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2007-03-12 17:41:01 +0000 |
commit | bb7cba95053dfcfe2c6c48a4e1790963a396b810 (patch) | |
tree | d322c8f2878425dfb8388b4bb2aa820a39ae646d /src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java | |
parent | 5a140d2c0248d17b50d93082b819049dd9bdd6c2 (diff) | |
download | jitsi-bb7cba95053dfcfe2c6c48a4e1790963a396b810.zip jitsi-bb7cba95053dfcfe2c6c48a4e1790963a396b810.tar.gz jitsi-bb7cba95053dfcfe2c6c48a4e1790963a396b810.tar.bz2 |
rename message package to chat and change the structure of classes in order to allow conference chatting
Diffstat (limited to 'src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java index ae16c8d..54a9c84 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java @@ -70,7 +70,7 @@ public class ContactListCellRenderer extends JPanel this.nameLabel.setPreferredSize(new Dimension(10, 17)); - this.add(nameLabel, BorderLayout.CENTER); + this.add(nameLabel, BorderLayout.CENTER); } /** @@ -98,6 +98,23 @@ public class ContactListCellRenderer extends JPanel this.nameLabel.setIcon(listModel .getMetaContactStatusIcon(contactItem)); + String oldText = getToolTipText(); + ToolTipManager toolTipManager = ToolTipManager.sharedInstance(); + + if (toolTipText != null) { + if (oldText == null) { + toolTipManager.registerComponent(this); + } + } else { + toolTipManager.unregisterComponent(this); + } + + JToolTip tooltip = new JToolTip(); + + tooltip.setTipText("HOHO"); + + tooltip.setComponent(this); + this.nameLabel.setFont(this.getFont().deriveFont(Font.PLAIN)); this.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); @@ -208,8 +225,8 @@ public class ContactListCellRenderer extends JPanel } toolTipText += "</html>"; - this.setToolTipText(toolTipText); - + //this.setToolTipText(toolTipText); + this.isSelected = isSelected; return this; |