01: package net.sourceforge.squirrel_sql.fw.gui;
02:
03: /*
04: * This code was developed by INCORS GmbH (www.incors.com).
05: * It is published under the terms of the GNU Lesser General Public License.
06: */
07: import java.awt.Component;
08:
09: import javax.swing.DefaultListCellRenderer;
10: import javax.swing.JList;
11:
12: /**
13: * The only difference between this class and the DefaultListCellRenderer is that
14: * objects of this class are not opaque by default.
15: */
16: public class ModifiedDefaultListCellRenderer extends
17: DefaultListCellRenderer {
18: public Component getListCellRendererComponent(JList list,
19: Object value, int index, boolean isSelected,
20: boolean cellHasFocus) {
21: super.getListCellRendererComponent(list, value, index,
22: isSelected, cellHasFocus);
23: setOpaque(isSelected);
24: return this;
25: }
26: }
|