@Override public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (!useListColors && (isSelected || cellHasFocus)) { SynthLookAndFeel.setSelectedUI( (SynthLabelUI) SynthLookAndFeel.getUIOfType(getUI(), SynthLabelUI.class), isSelected, cellHasFocus, list.isEnabled(), false); } else { SynthLookAndFeel.resetSelectedUI(); } super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); return this; }
public Component getTableCellRendererComponent( JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (!useTableColors && (isSelected || hasFocus)) { SynthLookAndFeel.setSelectedUI( (SynthLabelUI) SynthLookAndFeel.getUIOfType(getUI(), SynthLabelUI.class), isSelected, hasFocus, table.isEnabled(), false); } else { SynthLookAndFeel.resetSelectedUI(); } super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); setIcon(null); if (table != null) { configureValue(value, table.getColumnClass(column)); } return this; }