comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 1738:6cdc7a77d3d4

Apply theme attributes to axis annotation. flys-artifacts/trunk@3028 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 19 Oct 2011 11:39:46 +0000
parents 0155cbaba182
children 8e6615ad60b8
comparison
equal deleted inserted replaced
1737:d26911cac2e4 1738:6cdc7a77d3d4
35 import org.jfree.ui.RectangleInsets; 35 import org.jfree.ui.RectangleInsets;
36 36
37 import de.intevation.flys.exports.ChartExportHelper; 37 import de.intevation.flys.exports.ChartExportHelper;
38 import de.intevation.flys.jfree.FLYSAnnotation; 38 import de.intevation.flys.jfree.FLYSAnnotation;
39 import de.intevation.flys.utils.ThemeUtil; 39 import de.intevation.flys.utils.ThemeUtil;
40 import de.intevation.flys.jfree.StickyAxisAnnotation;
40 41
41 42
42 /** 43 /**
43 * An abstract base class for creating XY charts. 44 * An abstract base class for creating XY charts.
44 * 45 *
458 : 1; 459 : 1;
459 460
460 lic.add(new LegendItem(fa.getLabel(), color)); 461 lic.add(new LegendItem(fa.getLabel(), color));
461 462
462 for (XYTextAnnotation ta: fa.getAnnotations()) { 463 for (XYTextAnnotation ta: fa.getAnnotations()) {
463 ta.setPaint(color); 464 if(ta instanceof StickyAxisAnnotation) {
464 ta.setOutlineStroke(new BasicStroke((float) lineWidth)); 465 StickyAxisAnnotation sta = (StickyAxisAnnotation)ta;
465 renderer.addAnnotation(ta); 466 sta.applyTheme(theme);
467 renderer.addAnnotation(sta);
468 }
469 else {
470 ta.setPaint(color);
471 ta.setOutlineStroke(new BasicStroke((float) lineWidth));
472 renderer.addAnnotation(ta);
473 }
466 } 474 }
467 475
468 plot.setFixedLegendItems(lic); 476 plot.setFixedLegendItems(lic);
469 } 477 }
470 } 478 }

http://dive4elements.wald.intevation.org