Revision 22768 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/styling/labeling/AttrInTableLabelingStrategy.java

View differences:

AttrInTableLabelingStrategy.java
191 191
		xml.putProperty("className", getClassName());
192 192

  
193 193
		try {
194
			xml.putProperty("HeightField", getHeightField());
194
			if(getHeightField() != null)
195
				xml.putProperty("HeightField", getHeightField());
195 196
		} catch (ReadDriverException e) {
196 197
			Logger.getAnonymousLogger().log(Level.SEVERE, "Acessing TextHeight field.\n"+e.getMessage());
197 198
		}
198 199

  
199 200
		try {
200
			xml.putProperty("TextField", getTextField());
201
			if(getTextField() != null)
202
				xml.putProperty("TextField", getTextField());
201 203
		} catch (ReadDriverException e) {
202 204
			Logger.getAnonymousLogger().log(Level.SEVERE, "Acessing TextField field.\n"+e.getMessage());
203 205
		}
204 206

  
205 207
		try {
206
			xml.putProperty("RotationField", getRotationField());
208
			if (getRotationField() != null)
209
				xml.putProperty("RotationField", getRotationField());
207 210
		} catch (ReadDriverException e) {
208 211
			Logger.getAnonymousLogger().log(Level.SEVERE, "Acessing RotationField field.\n"+e.getMessage());
209 212
		}
210 213

  
211
		xml.putProperty("Font", getFont());
214
		if(getFont() != null)
215
			xml.putProperty("Font", getFont());
216
		if(getColorFont() != null)
217
			xml.putProperty("Color", getColorFont());
212 218

  
213
		xml.putProperty("Color", getColorFont());
214

  
215 219
		xml.putProperty("Unit", unit);
216 220
		return xml;
217 221

  

Also available in: Unified diff