93 |
|
|
94 |
if (isSelected) |
if (isSelected) |
95 |
{ |
{ |
96 |
setBackground(list.getSelectionBackground()); |
setBackground(list.getSelectionBackground()); |
97 |
setForeground(list.getSelectionForeground()); |
setForeground(list.getSelectionForeground()); |
98 |
} |
} |
99 |
else |
else |
100 |
{ |
{ |
101 |
setBackground(list.getBackground()); |
setBackground(list.getBackground()); |
102 |
setForeground(list.getForeground()); |
setForeground(list.getForeground()); |
103 |
} |
} |
104 |
|
|
105 |
setEnabled(list.isEnabled()); |
setEnabled(list.isEnabled()); |
106 |
setFont(list.getFont()); |
setFont(list.getFont()); |
107 |
|
|
108 |
// Use focusCellHighlightBorder when renderer has focus and |
// Use focusCellHighlightBorder when renderer has focus and |
109 |
// noFocusBorder otherwise |
// noFocusBorder otherwise |
110 |
|
|
111 |
if (cellHasFocus) |
if (cellHasFocus) |
112 |
setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); |
setBorder(UIManager.getBorder("List.focusCellHighlightBorder")); |
113 |
else |
else |