/** * Shows that the user is going offline. */ public void showUserGoingOfflineOnline() { // Change Font getNicknameLabel().setFont(new Font("Dialog", Font.BOLD, fontSize)); getNicknameLabel().setForeground(Color.red); }
/** * Shows that the user is coming online. */ public void showUserComingOnline() { // Change Font getNicknameLabel().setFont(new Font("Dialog", Font.BOLD, fontSize)); getNicknameLabel().setForeground(new Color(255, 128, 0)); }
protected void setOfflineGroupNameFont(ContactItem item) { item.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, item.fontSize)); item.getNicknameLabel().setForeground(Color.GRAY); }
noContacts.getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, 11)); noContacts.getNicknameLabel().setForeground(Color.GRAY); model.addElement(noContacts);
@Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { basicPanelRenderer.getListCellRendererComponent(list, this, index, isSelected, cellHasFocus); ContactItem renderItem = (ContactItem)value; setFocusable(false); setNickname(renderItem.getNickname()); setAlias(renderItem.getAlias()); if (this.getDisplayName().trim().isEmpty()) { // Fallback hack to show something other than empty string. // JID can't be set after object creation, so alias is reset. setAlias(renderItem.getDisplayName()); } setIcon(renderItem.getIcon()); setStatus(renderItem.getStatus()); getNicknameLabel().setFont(renderItem.getNicknameLabel().getFont()); getNicknameLabel().setForeground(renderItem.getNicknameLabel().getForeground()); getDescriptionLabel().setFont(renderItem.getDescriptionLabel().getFont()); getDescriptionLabel().setText(renderItem.getDescriptionLabel().getText()); getSpecialImageLabel().setIcon(renderItem.getSpecialImageLabel().getIcon()); getSideIcon().setIcon(renderItem.getSideIcon().getIcon()); return this; } }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); } ContactItem contactItem = (ContactItem)value; setText(contactItem.getDisplayName()); if (contactItem.getIcon() == null) { setIcon(SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON)); } else { setIcon(contactItem.getIcon()); } setFont(contactItem.getNicknameLabel().getFont()); setForeground(contactItem.getForeground()); return this; } }
getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, fontSize)); getNicknameLabel().setForeground((Color)UIManager.get("ContactItemOffline.color")); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, fontSize)); setStatusText(Res.getString("status.pending")); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, fontSize)); setAvailable(false); if (ModelUtil.hasLength(status)) { getNicknameLabel().setForeground((Color)UIManager.get("ContactItemNickname.foreground")); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, fontSize)); if (Res.getString("status.online").equals(status) || Res.getString("available").equalsIgnoreCase(status)) { setStatusText(""); if(pref.isGrayingOutEnabled()) getNicknameLabel().setFont(new Font("Dialog", Font.ITALIC, fontSize)); getNicknameLabel().setForeground(Color.gray); getNicknameLabel().setFont(new Font("Dialog", Font.PLAIN, fontSize)); getNicknameLabel().setForeground(Color.black);
newContact.setPresence(item.getPresence()); newContact.setIcon(item.getIcon()); newContact.getNicknameLabel().setFont(item.getNicknameLabel().getFont());
newContact.setPresence(item.getPresence()); newContact.setIcon(item.getIcon()); newContact.getNicknameLabel().setFont(item.getNicknameLabel().getFont()); boolean groupHadAvailableContacts = false;