diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java
index 2cf526409..fb7ea7a22 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/DefaultContactList.java
@@ -23,12 +23,16 @@
* DeafultContactlist used to display JLists with contacts.
*
* @author Damian Minkov
+ * @author Yana Stamcheva
*/
public class DefaultContactList
extends JList
{
private static final long serialVersionUID = 0L;
+ /**
+ * Creates an instance of DefaultContactList.
+ */
public DefaultContactList()
{
this.setOpaque(false);
@@ -123,9 +127,11 @@ public JToolTip createToolTip()
Iterator i = metaContact.getContacts();
+ String statusMessage = null;
+ Contact protocolContact;
while (i.hasNext())
{
- Contact protocolContact = i.next();
+ protocolContact = i.next();
ImageIcon protocolStatusIcon
= new ImageIcon(
@@ -135,7 +141,16 @@ public JToolTip createToolTip()
//String statusMessage = protocolContact.getStatusMessage();
tip.addLine(protocolStatusIcon, contactAddress);
+
+ // Set the first found status message.
+ if (statusMessage == null
+ && protocolContact.getStatusMessage() != null
+ && protocolContact.getStatusMessage().length() > 0)
+ statusMessage = protocolContact.getStatusMessage();
}
+
+ if (statusMessage != null)
+ tip.setBottomText(statusMessage);
}
else if (element instanceof MetaContactGroup)
{
@@ -166,6 +181,7 @@ else if (element instanceof ChatContact)
* in order to make the TooltipManager change the tooltip over the different
* cells in the JList.
*
+ * @param event the MouseEvent that notified us
* @return the string to be used as the tooltip for event.
*/
public String getToolTipText(MouseEvent event)