Revision 9524 branches/piloto3d/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/AnnotationEditableAdapter.java

View differences:

AnnotationEditableAdapter.java
83 83
		Value total = ValueFactory.createValue(t);
84 84

  
85 85
		FLabel[] lbls = geom.createLabels(0, true);
86
		double rotat = 0;
87
		FSymbol sym = (FSymbol) legend.getDefaultSymbol();
86 88
		for (int j = 0; j < lbls.length; j++) {
87 89
			if (lbls[j] != null) {
88 90
				lbls[j].setString(val.toString());
89 91
				if (idFieldRotationText != -1) {
90 92
					DoubleValue rotation = (DoubleValue) row
91 93
							.getAttribute(idFieldRotationText);
92
					lbls[j].setRotation(rotation.getValue());
94
					rotat = rotation.getValue();
93 95
				} else {
94
					lbls[j]
95
							.setRotation(legend.getDefaultSymbol()
96
									.getRotation());
96
					rotat = sym.getRotation();
97 97
				}
98
				lbls[j].setRotation(rotat);
98 99

  
99 100
				float height;
100 101
				if (idFieldHeightText != -1) {
......
103 104
					height = h.floatValue();
104 105
					lbls[j].setHeight(height);
105 106
				} else {
106
					height = legend.getDefaultSymbol().getFontSize();
107
					height = sym.getFontSize();
107 108
					lbls[j].setHeight(height);
108 109
				}
109 110
				VectorialUniqueValueLegend vuvl = (VectorialUniqueValueLegend) legend;
......
114 115
								.getAttribute(idFieldColorText);
115 116
						color = new Color((int) c.getValue());
116 117
					} else {
117
						color = legend.getDefaultSymbol().getFontColor();
118
						color = sym.getFontColor();
118 119
					}
119 120
					String typeFont;
120 121
					if (idFieldTypeFontText != -1) {
......
122 123
								.getAttribute(idFieldTypeFontText);
123 124
						typeFont = tf.getValue();
124 125
					} else {
125
						typeFont = legend.getDefaultSymbol().getFont()
126
						typeFont = sym.getFont()
126 127
								.getFontName();
127 128
					}
128 129
					int style;
......
131 132
								.getAttribute(idFieldStyleFontText);
132 133
						style = sf.getValue();
133 134
					} else {
134
						style = legend.getDefaultSymbol().getFont().getStyle();
135
						style = sym.getFont().getStyle();
135 136
					}
136 137
					symbol = new FSymbol(FConstant.SYMBOL_TYPE_TEXT);
137 138
					symbol.setFontSizeInPixels(isInPixels);
......
179 180
		index.insert(new Envelope(r.getX(), r.getX() + r.getWidth(), r.getY(),
180 181
                r.getY() + r.getHeight()), new Integer(calculatedIndex));
181 182
        //lyrAnnotation.getFMap().invalidate();
182
        fireAfterRowAdded(calculatedIndex, sourceType);
183
        fireAfterRowAdded(feat,calculatedIndex, sourceType);
183 184
        return calculatedIndex;
184 185
	}
185 186

  
......
392 393
	    Rectangle2D r = getLabel(index,true).getBoundBox();
393 394
	    this.index.insert(new Envelope(r.getX(), r.getX() + r.getWidth(),
394 395
	                r.getY(), r.getY() + r.getHeight()), new Integer(index));
395
	    fireAfterRowAdded(index, sourceType);
396
	    fireAfterRowAdded(null,index, sourceType);
396 397
	}
397 398

  
398 399
	public AnnotationEditableAdapter(FLyrAnnotation lyrAnnotation) {

Also available in: Unified diff