diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java b/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java index 1381e2279..aaf6f73a8 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java @@ -29,33 +29,33 @@ * Custom TableCellRenderer that renders * ProtocolProviderService objects, MetaContactGroup * objects and JLabels. - * + * * @author Yana Stamcheva */ public class LabelTableCellRenderer extends JPanel implements TableCellRenderer { - + private JLabel label = new JLabel(); - + public LabelTableCellRenderer(){ label.setHorizontalAlignment(JLabel.CENTER); this.setOpaque(true); - + this.add(label, BorderLayout.CENTER); } - + public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { - + if(value instanceof JLabel) { JLabel labelValue = (JLabel)value; - + label.setText(labelValue.getText()); label.setIcon(labelValue.getIcon()); } else if (value instanceof ProtocolProviderService) { ProtocolProviderService pps = (ProtocolProviderService)value; - label.setText(pps.getAccountID().getAccountUserID()); + label.setText(pps.getAccountID().getUserID()); } else if (value instanceof MetaContactGroup) { MetaContactGroup group = (MetaContactGroup) value; @@ -64,12 +64,12 @@ else if (value instanceof MetaContactGroup) { else { label.setText(value.toString()); } - + if(isSelected) this.setBackground(Constants.SELECTED_END_COLOR); else this.setBackground(UIManager.getColor("Table.background")); - + return this; } }