Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Oct 19 11:00:13 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Oct 19 11:39:46 2011 +0000 @@ -37,6 +37,7 @@ import de.intevation.flys.exports.ChartExportHelper; import de.intevation.flys.jfree.FLYSAnnotation; import de.intevation.flys.utils.ThemeUtil; +import de.intevation.flys.jfree.StickyAxisAnnotation; /** @@ -460,9 +461,16 @@ lic.add(new LegendItem(fa.getLabel(), color)); for (XYTextAnnotation ta: fa.getAnnotations()) { - ta.setPaint(color); - ta.setOutlineStroke(new BasicStroke((float) lineWidth)); - renderer.addAnnotation(ta); + if(ta instanceof StickyAxisAnnotation) { + StickyAxisAnnotation sta = (StickyAxisAnnotation)ta; + sta.applyTheme(theme); + renderer.addAnnotation(sta); + } + else { + ta.setPaint(color); + ta.setOutlineStroke(new BasicStroke((float) lineWidth)); + renderer.addAnnotation(ta); + } } plot.setFixedLegendItems(lic);