Revision 22720

View differences:

trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/styling/labeling/AttrInTableLabelingStrategy.java
1 1
package com.iver.cit.gvsig.fmap.rendering.styling.labeling;
2 2

  
3
import java.awt.Color;
4
import java.awt.Font;
3 5
import java.awt.Graphics2D;
4 6
import java.awt.image.BufferedImage;
5 7
import java.util.Vector;
......
55 57
	private int referenceSystem;
56 58
	private boolean isPrinting;
57 59
	private double  printDPI;
60
	private Font font;
61
	private Color colorFont;
58 62

  
59 63
	public ILabelingMethod getLabelingMethod() {
60 64
		return this.method;
......
85 89
		double scale = viewPort.getScale();
86 90
		double fontScaleFactor = FConstant.FONT_HEIGHT_SCALE_FACTOR;
87 91

  
88
		
92

  
89 93
		SimpleTextSymbol sym = new SimpleTextSymbol();
94

  
95
		sym.setFont(getFont());
96
		sym.setTextColor(getColorFont());
97

  
90 98
		sym.setUnit(unit);
91 99
		sym.setReferenceSystem(referenceSystem);
92
		
100

  
93 101
		if (zoom==null ||
94 102
			( zoom.isUserDefined() && (scale >= zoom.getMaxScale())
95 103
			&& (scale <= zoom.getMinScale()) ) ) {
......
200 208
			Logger.getAnonymousLogger().log(Level.SEVERE, "Acessing RotationField field.\n"+e.getMessage());
201 209
		}
202 210

  
211
		xml.putProperty("Font", getFont());
212

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

  
203 215
		xml.putProperty("Unit", unit);
204 216
		return xml;
205 217

  
......
259 271

  
260 272
		if (xml.contains("UnitFactor"))
261 273
			setUnit(xml.getIntProperty("Unit"));
274

  
275
		if (xml.contains("Font"))
276
			setUnit(xml.getIntProperty("Font"));
277

  
278
		if (xml.contains("Color"))
279
			setUnit(xml.getIntProperty("Color"));
262 280
	}
263 281

  
264 282
	public void setTextField(String textFieldName) {
......
378 396
	public void setLayer(FLayer layer) {
379 397
		this.layer = (FLyrVect) layer;
380 398
	}
381
	
399

  
382 400
	public boolean shouldDrawLabels(double scale) {
383 401
		return layer.isWithinScale(scale);
384 402
	}
403

  
404
	public Color getColorFont() {
405
		return colorFont;
406
	}
407

  
408
	public void setColorFont(Color colorFont) {
409
		this.colorFont = colorFont;
410
	}
411

  
412
	public Font getFont() {
413
		return font;
414
	}
415

  
416
	public void setFont(Font selFont) {
417
		this.font = selFont;
418
	}
385 419
}

Also available in: Unified diff