aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java
diff options
context:
space:
mode:
authorSebastien Vincent <seb@jitsi.org>2012-02-20 16:36:46 +0000
committerSebastien Vincent <seb@jitsi.org>2012-02-20 16:36:46 +0000
commit2ffab015c4061db878317a09143a32d6a457c192 (patch)
treeba7682a2e8d9bbfcc93efbd805fca683235457f4 /src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListCellRenderer.java
parent0f119431f4c1b611293f4dcc689d8b46a17b7ce8 (diff)
downloadjitsi-2ffab015c4061db878317a09143a32d6a457c192.zip
jitsi-2ffab015c4061db878317a09143a32d6a457c192.tar.gz
jitsi-2ffab015c4061db878317a09143a32d6a457c192.tar.bz2
Adds UI for cross protocol conference calls. Adds also the possibility to add an incoming call into an existing call/conference. Fixes also the drag'n'drop for cross-protocol accounts.
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.java21
1 files changed, 16 insertions, 5 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 d9b1dc9..09ad46f 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
@@ -36,6 +36,11 @@ public class ContactListCellRenderer
Skinnable
{
/**
+ * Serial version UID.
+ */
+ private static final long serialVersionUID = 0L;
+
+ /**
* The avatar icon height.
*/
private static final int AVATAR_HEIGHT = 30;
@@ -178,7 +183,7 @@ public class ContactListCellRenderer
* @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,
@@ -277,7 +282,7 @@ public class ContactListCellRenderer
// We have no photo icon for groups.
this.rightLabel.setIcon(null);
- this.rightLabel.setText( groupItem.countOnlineChildContacts()
+ this.rightLabel.setText( groupItem.countOnlineChildContacts()
+ "/" + groupItem.countChildContacts());
this.isLeaf = false;
@@ -288,6 +293,12 @@ public class ContactListCellRenderer
this.nameLabel.setText((String) value);
this.nameLabel.setFont(this.getFont().deriveFont(Font.PLAIN));
}
+ else
+ {
+ this.setPreferredSize(new Dimension(20, 30));
+ this.nameLabel.setText(value.toString());
+ this.nameLabel.setFont(this.getFont().deriveFont(Font.PLAIN));
+ }
this.isSelected = isSelected;
@@ -297,7 +308,7 @@ public class ContactListCellRenderer
/**
* Gets the avatar of a specific <tt>MetaContact</tt> in the form of an
* <tt>ImageIcon</tt> value.
- *
+ *
* @param metaContact the <tt>MetaContact</tt> to retrieve the avatar of
* @return an <tt>ImageIcon</tt> which represents the avatar of the
* specified <tt>MetaContact</tt>
@@ -309,7 +320,7 @@ public class ContactListCellRenderer
// Try to get the avatar from the cache.
Object[] avatarCache = (Object[]) metaContact.getData(AVATAR_DATA_KEY);
- if ((avatarCache != null) && (avatarCache[0] == avatarBytes))
+ if ((avatarCache != null) && (avatarCache[0] == avatarBytes))
avatar = (ImageIcon) avatarCache[1];
// If the avatar isn't available or it's not up-to-date, create it.
@@ -459,7 +470,7 @@ public class ContactListCellRenderer
getIconWidth() - 1, getIconHeight() - 1,
10, 10);
- // Indent component content from the border.
+ // Indent component content from the border.
g2.translate(x + 5, y + 5);
// Paint component.