Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java @ 2325:1fcaeced48f2
#485 Fixed broken renaming of chart themes.
flys-artifacts/trunk@4009 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 09 Feb 2012 15:59:49 +0000 |
parents | a3dd443976bc |
children | 594885703687 cd4fb19ab892 |
comparison
equal
deleted
inserted
replaced
2324:867ebe191799 | 2325:1fcaeced48f2 |
---|---|
34 import org.jfree.data.xy.XYDataset; | 34 import org.jfree.data.xy.XYDataset; |
35 | 35 |
36 import org.jfree.ui.RectangleInsets; | 36 import org.jfree.ui.RectangleInsets; |
37 import org.jfree.ui.TextAnchor; | 37 import org.jfree.ui.TextAnchor; |
38 | 38 |
39 import de.intevation.artifactdatabase.state.ArtifactAndFacet; | |
39 import de.intevation.artifactdatabase.state.Facet; | 40 import de.intevation.artifactdatabase.state.Facet; |
40 | 41 |
41 import de.intevation.flys.jfree.FLYSAnnotation; | 42 import de.intevation.flys.jfree.FLYSAnnotation; |
42 import de.intevation.flys.jfree.StickyAxisAnnotation; | 43 import de.intevation.flys.jfree.StickyAxisAnnotation; |
43 import de.intevation.flys.jfree.CollisionFreeXYTextAnnotation; | 44 import de.intevation.flys.jfree.CollisionFreeXYTextAnnotation; |
880 * @param theme Theme document for given annotations. | 881 * @param theme Theme document for given annotations. |
881 * @param visible The visibility of the annotations. | 882 * @param visible The visibility of the annotations. |
882 */ | 883 */ |
883 protected void doAnnotations( | 884 protected void doAnnotations( |
884 FLYSAnnotation annotations, | 885 FLYSAnnotation annotations, |
885 Facet facet, | 886 ArtifactAndFacet aandf, |
886 Document theme, | 887 Document theme, |
887 boolean visible | 888 boolean visible |
888 ){ | 889 ){ |
889 logger.debug("doAnnotations"); | 890 logger.debug("doAnnotations"); |
891 Facet facet = aandf.getFacet(); | |
890 | 892 |
891 // Add all annotations to our annotation pool. | 893 // Add all annotations to our annotation pool. |
892 annotations.setTheme(theme); | 894 annotations.setTheme(theme); |
893 if (facet != null) | 895 if (facet != null) |
894 annotations.setLabel(facet.getDescription()); | 896 annotations.setLabel(aandf.getFacetDescription()); |
895 addAnnotations(annotations, visible); | 897 addAnnotations(annotations, visible); |
896 } | 898 } |
897 | 899 |
898 | 900 |
899 /** | 901 /** |
900 * Do Points out. | 902 * Do Points out. |
901 */ | 903 */ |
902 protected void doPoints( | 904 protected void doPoints( |
903 Object o, | 905 Object o, |
904 String seriesName, | 906 ArtifactAndFacet aandf, |
905 Document theme, | 907 Document theme, |
906 boolean visible, | 908 boolean visible, |
907 int axisIndex | 909 int axisIndex |
908 ) { | 910 ) { |
911 String seriesName = aandf.getFacetDescription(); | |
909 XYSeries series = new StyledXYSeries(seriesName, theme); | 912 XYSeries series = new StyledXYSeries(seriesName, theme); |
910 | 913 |
911 // Add text annotations for single points. | 914 // Add text annotations for single points. |
912 List<XYTextAnnotation> xy = new ArrayList<XYTextAnnotation>(); | 915 List<XYTextAnnotation> xy = new ArrayList<XYTextAnnotation>(); |
913 | 916 |