Revision 40711
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/main/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/styling/LabelClass.java | ||
---|---|---|
545 | 545 |
state.set(FIELD_TEXT_SYMBOL, getTextSymbol()); |
546 | 546 |
state.set(FIELD_LABEL_EXPRESSIONS, getLabelExpressions()); |
547 | 547 |
state.set(FIELD_VISIBLE, isVisible()); |
548 |
state.set(FIELD_LABEL_STYLE, getLabelStyle()); |
|
548 |
|
|
549 |
ILabelStyle sty = getLabelStyle(); |
|
550 |
if (sty != null) { |
|
551 |
state.set(FIELD_LABEL_STYLE, getLabelStyle()); |
|
552 |
} |
|
553 |
|
|
549 | 554 |
state.set(FIELD_TEXTS, getTexts()); |
550 | 555 |
state.set(FIELD_PRIORITY, getPriority()); |
551 | 556 |
|
... | ... | |
570 | 575 |
setTextSymbol((ITextSymbol) state.get(FIELD_TEXT_SYMBOL)); |
571 | 576 |
setLabelExpressions(state.getStringArray(FIELD_LABEL_EXPRESSIONS)); |
572 | 577 |
setVisible(state.getBoolean(FIELD_VISIBLE)); |
573 |
setLabelStyle((ILabelStyle) state.get(FIELD_LABEL_STYLE)); |
|
578 |
|
|
579 |
if (state.hasValue(FIELD_LABEL_STYLE)) { |
|
580 |
setLabelStyle((ILabelStyle) state.get(FIELD_LABEL_STYLE)); |
|
581 |
} |
|
582 |
|
|
574 | 583 |
setTexts((String[]) state.getArray(FIELD_TEXTS, String.class)); |
575 | 584 |
setPriority(state.getInt(FIELD_PRIORITY)); |
576 | 585 |
scale = state.getDouble(FIELD_SCALE); |
... | ... | |
602 | 611 |
.setClassOfItems(String.class).setMandatory(true); |
603 | 612 |
|
604 | 613 |
definition.addDynFieldBoolean(FIELD_VISIBLE).setMandatory(true); |
605 |
definition.addDynFieldObject(FIELD_LABEL_STYLE).setMandatory(true).setClassOfValue(ILabelStyle.class); |
|
614 |
|
|
615 |
definition.addDynFieldObject(FIELD_LABEL_STYLE).setMandatory(false) |
|
616 |
.setClassOfValue(ILabelStyle.class); |
|
617 |
|
|
606 | 618 |
definition.addDynFieldList(FIELD_TEXTS).setMandatory(true).setClassOfItems(String.class); |
607 | 619 |
definition.addDynFieldInt(FIELD_PRIORITY).setMandatory(true); |
608 | 620 |
definition.addDynFieldDouble(FIELD_SCALE).setMandatory(true); |
Also available in: Unified diff