Revision 12906 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/JComboBoxColorScheme.java
JComboBoxColorScheme.java | ||
---|---|---|
74 | 74 |
File.separator + |
75 | 75 |
"ColorSchemes"; |
76 | 76 |
|
77 |
private ActionListener innerAction = new ActionListener() { |
|
77 |
private ActionListener innerActionUpdateTooltip = new ActionListener() {
|
|
78 | 78 |
public void actionPerformed(ActionEvent e) { |
79 | 79 |
Object o = getSelectedItem(); |
80 | 80 |
if (o != null) { |
... | ... | |
113 | 113 |
|
114 | 114 |
addItem(array); |
115 | 115 |
} |
116 |
addActionListener(innerAction); |
|
116 |
addActionListener(innerActionUpdateTooltip);
|
|
117 | 117 |
setRenderer(new ListCellRenderer() { |
118 | 118 |
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
119 | 119 |
ArrayList array = (ArrayList) value; |
... | ... | |
131 | 131 |
|
132 | 132 |
if (o == null) return null; |
133 | 133 |
|
134 |
ColorTable ct = ((ColorTablePaint) o).colorTable;
|
|
134 |
ColorTable ct = ((ColorTablePaint) ((ArrayList) o).get(1)).colorTable;
|
|
135 | 135 |
return (ColorItem[]) ct.getColorItems().toArray(new ColorItem[0]) ; |
136 | 136 |
} |
137 | 137 |
|
Also available in: Unified diff