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

View differences:

LabelClass.java
138 138
 * @author jaume dominguez faus - jaume.dominguez@iver.es
139 139
 */
140 140
public class LabelClass implements IPersistence, CartographicSupport {
141
	private String name;
141
	private String name; 
142 142
	private ITextSymbol textSymbol;
143 143
	private String labelExpression;
144 144
	private boolean isVisible = true;
......
201 201
	
202 202
	private Dimension getSize() {
203 203
		if (labelStyle == null) {
204
			if (texts!=null && texts.length >0)
205
				getTextSymbol().setText(texts[0]);
204
			if (texts!=null && texts.length >0) {
205
				String t = "";
206
				for (int i = 0; i < texts.length; i++) {
207
					t += texts[i];
208
				}
209
				getTextSymbol().setText(t);
210
			}
211
				
206 212
			Rectangle bounds = getTextSymbol().getBounds();
207 213
			bounds.setLocation(
208 214
					(int) Math.round(bounds.getX()), 
209 215
					(int) Math.round(bounds.getY()+bounds.getHeight()));
210 216
			return new Dimension(bounds.width, bounds.height);
211
		} else {
217
		} else { 
212 218
			labelStyle.setTextFields(texts); 
213 219
			return labelStyle.getSize();
214 220
		}
......
277 283
		
278 284
	}
279 285
	
286
	
280 287
	/**
281 288
	 * <p>
282 289
	 * LabelLocationMetrics, contains the anchor point, rotation, and some
......
310 317
		double xAnchor = anchor.getX();
311 318
		double yAnchor = anchor.getY();
312 319
		double theta = llm.getRotation();
320
 
313 321

  
314

  
315 322
		graphics.translate(xAnchor, yAnchor);
316 323
		graphics.rotate(theta);
317 324
		try {
......
324 331
		graphics.translate(-xAnchor, -yAnchor);
325 332
	}
326 333
	
334
	
327 335
	private void relativeToAbsolute(double[] xy, Rectangle r, Dimension labelSz, double ratioLabel, double ratioViewPort) {
328 336
		int x;
329 337
		int y;

Also available in: Unified diff