Component (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (isSelected || cellHasFocus) { setBackground(UIUtil.getListSelectionBackground(true)); Color selectedForegroundColor = NamedColorUtil.getListSelectionForeground(true); myUrlLabel.setForeground(selectedForegroundColor); myDateLabel.setForeground(selectedForegroundColor); setForeground(selectedForegroundColor); } else { setBackground(UIUtil.getListBackground()); Color foregroundColor = UIUtil.getListForeground(); myUrlLabel.setForeground(foregroundColor); myDateLabel.setForeground(NamedColorUtil.getInactiveTextColor()); setForeground(foregroundColor); } if (value instanceof String) { myUrlLabel.setText((String) value); myDateLabel.setText(""); } else { SvnBranchItem item = (SvnBranchItem) value; myUrlLabel.setText(getBranchName(item)); long creationMillis = item.getCreationDateMillis(); myDateLabel.setText(creationMillis > 0 ? DateFormatUtil.formatDate(creationMillis) : ""); } return this; }