Revision 7866 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrAnnotation.java
FLyrAnnotation.java | ||
---|---|---|
16 | 16 |
import com.hardcode.driverManager.Driver; |
17 | 17 |
import com.hardcode.driverManager.DriverLoadException; |
18 | 18 |
import com.hardcode.gdbms.engine.instruction.FieldNotFoundException; |
19 |
import com.hardcode.gdbms.engine.values.DoubleValue; |
|
20 | 19 |
import com.hardcode.gdbms.engine.values.IntValue; |
21 | 20 |
import com.hardcode.gdbms.engine.values.NullValue; |
22 | 21 |
import com.hardcode.gdbms.engine.values.NumericValue; |
... | ... | |
331 | 330 |
} |
332 | 331 |
} |
333 | 332 |
ICoordTrans ct = getCoordTrans(); |
333 |
FSymbol defaultSym = (FSymbol) getLegend().getDefaultSymbol(); |
|
334 | 334 |
for (int i = 0; i < sc; i++) { |
335 | 335 |
IGeometry geom = adapter.getShape(i); |
336 | 336 |
|
... | ... | |
380 | 380 |
if (lbls[j] != null) { |
381 | 381 |
lbls[j].setString(val.toString()); |
382 | 382 |
if (idFieldRotationText != -1) { |
383 |
DoubleValue rotation = (DoubleValue) ds
|
|
383 |
NumericValue rotation = (NumericValue) ds
|
|
384 | 384 |
.getFieldValue(i, idFieldRotationText); |
385 |
lbls[j].setRotation(rotation.getValue());
|
|
385 |
lbls[j].setRotation(rotation.doubleValue());
|
|
386 | 386 |
} else { |
387 |
lbls[j].setRotation(getLegend().getDefaultSymbol() |
|
388 |
.getRotation()); |
|
387 |
lbls[j].setRotation(defaultSym.getRotation()); |
|
389 | 388 |
} |
390 | 389 |
|
391 | 390 |
float height; |
... | ... | |
395 | 394 |
height=h.floatValue(); |
396 | 395 |
lbls[j].setHeight(height); |
397 | 396 |
} else { |
398 |
height=getLegend().getDefaultSymbol() |
|
399 |
.getFontSize(); |
|
397 |
height=defaultSym.getFontSize(); |
|
400 | 398 |
lbls[j].setHeight(height); |
401 | 399 |
} |
402 | 400 |
|
... | ... | |
405 | 403 |
if (vuvl.getSymbolByValue(total)==null){ |
406 | 404 |
Color color; |
407 | 405 |
if (idFieldColorText != -1) { |
408 |
DoubleValue c = (DoubleValue) ds.getFieldValue(
|
|
406 |
NumericValue c = (NumericValue) ds.getFieldValue(
|
|
409 | 407 |
i, idFieldColorText); |
410 |
color=new Color((int) c.getValue());
|
|
408 |
color=new Color(c.intValue());
|
|
411 | 409 |
} else { |
412 |
color=getLegend().getDefaultSymbol() |
|
413 |
.getFontColor(); |
|
410 |
color=defaultSym.getFontColor(); |
|
414 | 411 |
} |
415 | 412 |
String typeFont; |
416 | 413 |
if (idFieldTypeFontText != -1) { |
... | ... | |
418 | 415 |
.getFieldValue(i, idFieldTypeFontText); |
419 | 416 |
typeFont=tf.getValue(); |
420 | 417 |
} else { |
421 |
typeFont=getLegend().getDefaultSymbol() |
|
422 |
.getFont().getFontName(); |
|
418 |
typeFont=defaultSym.getFont().getFontName(); |
|
423 | 419 |
} |
424 | 420 |
int style; |
425 | 421 |
if (idFieldStyleFontText != -1) { |
... | ... | |
427 | 423 |
.getFieldValue(i, idFieldStyleFontText); |
428 | 424 |
style=sf.getValue(); |
429 | 425 |
} else { |
430 |
style=getLegend().getDefaultSymbol() |
|
431 |
.getFont().getStyle(); |
|
426 |
style=defaultSym.getFont().getStyle(); |
|
432 | 427 |
} |
433 | 428 |
symbol=new FSymbol(FConstant.SYMBOL_TYPE_TEXT); |
434 | 429 |
symbol.setFontSizeInPixels(isInPixels()); |
... | ... | |
462 | 457 |
if (getSource() instanceof AnnotationEditableAdapter){ |
463 | 458 |
AnnotationEditableAdapter aea=((AnnotationEditableAdapter)getSource()); |
464 | 459 |
return aea.getLabel(numReg,false); |
465 |
} else
|
|
466 |
return (FLabel)m_labels.get(numReg);
|
|
460 |
} |
|
461 |
return (FLabel)m_labels.get(numReg); |
|
467 | 462 |
} |
468 | 463 |
|
469 | 464 |
/* |
Also available in: Unified diff