Revision 9627
branches/piloto3d/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toc/actions/FSymbolChangeColorTocMenuEntry.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import javax.swing.JColorChooser; |
6 | 6 |
|
7 |
import com.hardcode.gdbms.engine.instruction.FieldNotFoundException; |
|
7 | 8 |
import com.iver.andami.PluginServices; |
9 |
import com.iver.cit.gvsig.fmap.DriverException; |
|
8 | 10 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
9 | 11 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
10 | 12 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.ClassifiableVectorial; |
11 | 13 |
import com.iver.cit.gvsig.fmap.rendering.SingleSymbolLegend; |
14 |
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend; |
|
12 | 15 |
import com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction; |
13 | 16 |
import com.iver.cit.gvsig.project.documents.view.toc.ITocItem; |
14 | 17 |
import com.iver.cit.gvsig.project.documents.view.toc.TocItemLeaf; |
... | ... | |
56 | 59 |
* |
57 | 60 |
* $Id$ |
58 | 61 |
* $Log$ |
59 |
* Revision 1.4.4.1 2007-01-03 17:07:30 sbayarri |
|
62 |
* Revision 1.4.4.2 2007-01-10 13:42:08 sbayarri |
|
63 |
* Fix bug: color change in layer wasn't refreshing layer in 3D |
|
64 |
* |
|
65 |
* Revision 1.4.4.1 2007/01/03 17:07:30 sbayarri |
|
60 | 66 |
* Fix wrong files |
61 | 67 |
* |
62 | 68 |
* Revision 1.4.2.1 2006/11/15 04:10:44 jjdelcerro |
... | ... | |
162 | 168 |
{ |
163 | 169 |
SingleSymbolLegend leg = (SingleSymbolLegend) lyrVect.getLegend(); |
164 | 170 |
((FSymbol)leg.getDefaultSymbol()).setColor(newColor); |
171 |
// set changed legend, so layer event is fired |
|
172 |
try { |
|
173 |
lyrVect.setLegend((VectorialLegend)leg); |
|
174 |
} catch (FieldNotFoundException e) { |
|
175 |
// TODO Auto-generated catch block |
|
176 |
e.printStackTrace(); |
|
177 |
} catch (DriverException e) { |
|
178 |
// TODO Auto-generated catch block |
|
179 |
e.printStackTrace(); |
|
180 |
} |
|
165 | 181 |
} |
166 | 182 |
} |
167 | 183 |
} |
... | ... | |
171 | 187 |
TocItemLeaf leaf = (TocItemLeaf) item; |
172 | 188 |
FSymbol sym = (FSymbol) leaf.getSymbol(); |
173 | 189 |
sym.setColor(newColor); |
174 |
|
|
175 | 190 |
} |
176 | 191 |
// TRUCO PARA REFRESCAR. |
177 | 192 |
getMapContext().invalidate(); |
Also available in: Unified diff