Revision 7659 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrAnnotation.java

View differences:

FLyrAnnotation.java
26 26
import com.iver.cit.gvsig.fmap.DriverException;
27 27
import com.iver.cit.gvsig.fmap.ViewPort;
28 28
import com.iver.cit.gvsig.fmap.core.IGeometry;
29
import com.iver.cit.gvsig.fmap.core.ISymbol;
29 30
import com.iver.cit.gvsig.fmap.core.v02.FConstant;
30 31
import com.iver.cit.gvsig.fmap.core.v02.FLabel;
31 32
import com.iver.cit.gvsig.fmap.core.v02.FSymbol;
......
93 94

  
94 95
	/**
95 96
	 * @see com.iver.cit.gvsig.fmap.layers.LayerOperations#draw(java.awt.image.BufferedImage,
96
	 *      java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort)
97
	 *      java.awt.Graphics2D, ISymbol)
97 98
	 */
98 99
	public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort,
99 100
			Cancellable cancel, double scale) throws DriverException {
......
300 301
	 * @param lyrVect
301 302
	 * @throws DriverException
302 303
	 */
303
	public void createLabels() throws DriverException {
304
	private void createLabels() throws DriverException {
304 305
		SelectableDataSource ds = getRecordset();
305 306
		FSymbol symbol;
306 307
		try {
......
331 332
				}
332 333
			}
333 334
			ICoordTrans ct = getCoordTrans();
335
			FSymbol defaultSym = (FSymbol) getLegend().getDefaultSymbol(); 
334 336
			for (int i = 0; i < sc; i++) {
335 337
				IGeometry geom = adapter.getShape(i);
336 338

  
......
384 386
									.getFieldValue(i, idFieldRotationText);
385 387
							lbls[j].setRotation(rotation.getValue());
386 388
						} else {
387
							lbls[j].setRotation(getLegend().getDefaultSymbol()
388
									.getRotation());
389
							lbls[j].setRotation(defaultSym.getRotation());
389 390
						}
390 391

  
391 392
						float height;
......
395 396
							height=h.floatValue();
396 397
							lbls[j].setHeight(height);
397 398
						} else {
398
							height=getLegend().getDefaultSymbol()
399
							.getFontSize();
399
							height=defaultSym.getFontSize();
400 400
							lbls[j].setHeight(height);
401 401
						}
402 402

  
......
409 409
										i, idFieldColorText);
410 410
								color=new Color((int) c.getValue());
411 411
							} else {
412
								color=getLegend().getDefaultSymbol()
413
										.getFontColor();
412
								color=defaultSym.getFontColor();
414 413
							}
415 414
							String typeFont;
416 415
							if (idFieldTypeFontText != -1) {
......
418 417
										.getFieldValue(i, idFieldTypeFontText);
419 418
								typeFont=tf.getValue();
420 419
							} else {
421
								typeFont=getLegend().getDefaultSymbol()
422
									.getFont().getFontName();
420
								typeFont=defaultSym.getFont().getFontName();
423 421
							}
424 422
							int style;
425 423
							if (idFieldStyleFontText != -1) {
......
427 425
										.getFieldValue(i, idFieldStyleFontText);
428 426
								style=sf.getValue();
429 427
							} else {
430
								style=getLegend().getDefaultSymbol()
431
									.getFont().getStyle();
428
								style=defaultSym.getFont().getStyle();
432 429
							}
433 430
							symbol=new FSymbol(FConstant.SYMBOL_TYPE_TEXT);
434 431
							symbol.setFontSizeInPixels(isInPixels());

Also available in: Unified diff