/** * Set an Icon for all ContactItems that match the given jid. * * @param jid the users jid. * @param icon the icon to use. */ public void setIconFor(Jid jid, Icon icon) { for (ContactGroup group : getContactGroups()) { ContactItem item = group.getContactItemByJID(jid.asBareJid()); if (item != null) { item.setIcon(icon); group.fireContactGroupUpdated(); } } }
item.setIcon(SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON)); group.fireContactGroupUpdated();
&& entry.isSubscriptionPending()) { setIcon(SparkRes.getImageIcon(SparkRes.SMALL_QUESTION)); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, fontSize)); setStatusText(Res.getString("status.pending")); setIcon(SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON)); setFont(new Font("Dialog", Font.PLAIN, fontSize)); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, fontSize)); setIcon(sIcon); setIcon(statusIcon); setIcon(statusIcon);
private void addContactItem(final ContactGroup contactGroup, final ContactItem item) { ContactItem newContact = UIComponentRegistry.createContactItem(Res.getString("group.empty"), null, null); newContact.setPresence(item.getPresence()); newContact.setIcon(item.getIcon()); newContact.getNicknameLabel().setFont(item.getNicknameLabel().getFont());
ContactItem newContact = UIComponentRegistry.createContactItem(item.getAlias(), item.getNickname(), item.getJid()); newContact.setPresence(item.getPresence()); newContact.setIcon(item.getIcon()); newContact.getNicknameLabel().setFont(item.getNicknameLabel().getFont()); boolean groupHadAvailableContacts = false;