Revision 24374 trunk/extensions/extSymbology/src/org/gvsig/symbology/fmap/rendering/QuantityByCategoryLegend.java
QuantityByCategoryLegend.java | ||
---|---|---|
206 | 206 |
|
207 | 207 |
public void setDataSource(DataSource ds) throws FieldNotFoundException, ReadDriverException { |
208 | 208 |
// TODO remove it when FLyrVect.forTestOnlyVariableUseIterators_REMOVE_THIS_FIELD is removed |
209 |
if (FLyrVect.forTestOnlyVariableUseIterators_REMOVE_THIS_FIELD) { |
|
209 |
// if (FLyrVect.forTestOnlyVariableUseIterators_REMOVE_THIS_FIELD) {
|
|
210 | 210 |
this.ds = ds; |
211 |
} |
|
211 |
// }
|
|
212 | 212 |
graduatedSymbol.setDataSource(ds); |
213 | 213 |
colorRamp.setDataSource(ds); |
214 | 214 |
} |
... | ... | |
250 | 250 |
|
251 | 251 |
public ISymbol getSymbolByFeature(IFeature feat) { |
252 | 252 |
ISymbol sym1 = null, sym2 = null; |
253 |
try { |
|
253 |
// try {
|
|
254 | 254 |
Value gsVal; |
255 |
if (!FLyrVect.forTestOnlyVariableUseIterators_REMOVE_THIS_FIELD) { |
|
256 |
gsVal = feat.getAttribute(ds.getFieldIndexByName(getClassifyingFieldNames()[0])); |
|
257 |
|
|
258 |
} else { |
|
255 |
// if (!FLyrVect.forTestOnlyVariableUseIterators_REMOVE_THIS_FIELD) {
|
|
256 |
// gsVal = feat.getAttribute(ds.getFieldIndexByName(getClassifyingFieldNames()[0]));
|
|
257 |
// |
|
258 |
// } else {
|
|
259 | 259 |
gsVal = feat.getAttribute(0); |
260 |
} |
|
260 |
// }
|
|
261 | 261 |
sym1 = graduatedSymbol.getSymbolByInterval(graduatedSymbol.getInterval(gsVal)); |
262 | 262 |
|
263 |
} catch (ReadDriverException e) { |
|
264 |
Logger.getLogger(getClass()).error("Graduated Symbol Legend failed", e); |
|
265 |
} |
|
263 |
// } catch (ReadDriverException e) {
|
|
264 |
// Logger.getLogger(getClass()).error("Graduated Symbol Legend failed", e);
|
|
265 |
// }
|
|
266 | 266 |
|
267 | 267 |
|
268 |
try { |
|
268 |
// try {
|
|
269 | 269 |
Value crVal; |
270 |
if (!FLyrVect.forTestOnlyVariableUseIterators_REMOVE_THIS_FIELD) { |
|
271 |
crVal = feat.getAttribute(ds.getFieldIndexByName(getClassifyingFieldNames()[1])); |
|
272 |
} else { |
|
270 |
// if (!FLyrVect.forTestOnlyVariableUseIterators_REMOVE_THIS_FIELD) {
|
|
271 |
// crVal = feat.getAttribute(ds.getFieldIndexByName(getClassifyingFieldNames()[1]));
|
|
272 |
// } else {
|
|
273 | 273 |
crVal = feat.getAttribute(1); |
274 |
} |
|
274 |
// }
|
|
275 | 275 |
sym2 = colorRamp.getSymbolByInterval(colorRamp.getInterval(crVal)); |
276 | 276 |
|
277 |
} catch (ReadDriverException e) { |
|
278 |
Logger.getLogger(getClass()).error("Color Ramp Symbol Legend failed", e); |
|
279 |
} |
|
277 |
// } catch (ReadDriverException e) {
|
|
278 |
// Logger.getLogger(getClass()).error("Color Ramp Symbol Legend failed", e);
|
|
279 |
// }
|
|
280 | 280 |
|
281 | 281 |
IMultiLayerSymbol multiSym = null; |
282 | 282 |
switch (shapeType) { |
Also available in: Unified diff