From 93c157e8d8a88b1a3d64cc217978c987806b0af6 Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Sat, 24 Oct 2009 11:29:47 +0000 Subject: [PATCH] Updates extending renderers. (Fix of revision: 6177 Makes the contact count indicator in the contact list fit better the general contact list look) --- .../conference/ChatContactCellRenderer.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactCellRenderer.java index f5ba8ca8f..5815a6b73 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatContactCellRenderer.java @@ -24,6 +24,18 @@ public class ChatContactCellRenderer extends ContactListCellRenderer { + /** + * Implements the ListCellRenderer method. Returns this panel that + * has been configured to display a chat contact. + * + * @param list the source list + * @param value the value of the current cell + * @param index the index of the current cell in the source list + * @param isSelected indicates if this cell is selected + * @param cellHasFocus indicates if this cell is focused + * + * @return this panel + */ public Component getListCellRendererComponent( JList list, Object value, int index, @@ -32,7 +44,7 @@ public Component getListCellRendererComponent( JList list, { this.index = index; - this.photoLabel.setIcon(null); + this.rightLabel.setIcon(null); ChatContact chatContact = (ChatContact) value; @@ -60,7 +72,7 @@ public Component getListCellRendererComponent( JList list, ImageIcon avatar = chatContact.getAvatar(); if (avatar != null) - this.photoLabel.setIcon(avatar); + this.rightLabel.setIcon(avatar); // We should set the bounds of the cell explicitly in order to // make getComponentAt work properly. @@ -69,7 +81,7 @@ public Component getListCellRendererComponent( JList list, this.nameLabel.setBounds( 0, 0, list.getWidth() - 28, 17); - this.photoLabel.setBounds( + this.rightLabel.setBounds( list.getWidth() - 28, 0, 25, 30); this.isLeaf = true;