1 | public Component getListCellRendererComponent(JList list, Object value,↵ | | 1 | public Component getListCellRendererComponent(JList list, Object value,↵
|
2 | int index, boolean isSelected, boolean cellHasFocus) {↵ | | 2 | int index, boolean isSelected, boolean cellHasFocus) {↵
|
|
3 | if (isSelected) {↵ | | 3 | if (isSelected) {↵
|
4 | setBackground(list.getSelectionBackground());↵ | | 4 | setBackground(list.getSelectionBackground());↵
|
5 | setForeground(list.getSelectionForeground());↵ | | 5 | setForeground(list.getSelectionForeground());↵
|
|
6 | } else {↵ | | 6 | } else {↵
|
7 | setBackground(list.getBackground());↵ | | 7 | setBackground(list.getBackground());↵
|
8 | setForeground(list.getForeground());↵ | | 8 | setForeground(list.getForeground());↵
|
|
9 | }↵ | | 9 | }↵
|
|
10 | ISearchResult result = (ISearchResult) value;↵ | | 10 | IContactModelPartial result = (IContactModelPartial) value;↵
|
|
11 | titleLabel.setText(result.getTitle());↵ | | 11 | titleLabel.setText(result.getName());↵
|
12 | iconLabel.setIcon(ImageLoader.getSmallIcon(IconKeys.USER));↵ | | 12 | iconLabel.setIcon(ImageLoader.getSmallIcon(IconKeys.USER));↵
|
13 | descriptionLabel.setText(result.getDescription());↵ | | 13 | descriptionLabel.setText(result.getAddress());↵
|
|
14 | return this;↵ | | 14 | return this;↵
|
15 | | | 15 |
|