Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java @ 5864:f2e46a668fe6
River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 15:04:44 +0200 |
parents | 4897a58c8746 |
children | 73da40528cf2 |
comparison
equal
deleted
inserted
replaced
5863:4897a58c8746 | 5864:f2e46a668fe6 |
---|---|
22 import org.dive4elements.river.collections.FLYSArtifactCollection; | 22 import org.dive4elements.river.collections.FLYSArtifactCollection; |
23 import org.dive4elements.river.jfree.Bounds; | 23 import org.dive4elements.river.jfree.Bounds; |
24 import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation; | 24 import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation; |
25 import org.dive4elements.river.jfree.DoubleBounds; | 25 import org.dive4elements.river.jfree.DoubleBounds; |
26 import org.dive4elements.river.jfree.EnhancedLineAndShapeRenderer; | 26 import org.dive4elements.river.jfree.EnhancedLineAndShapeRenderer; |
27 import org.dive4elements.river.jfree.FLYSAnnotation; | 27 import org.dive4elements.river.jfree.RiverAnnotation; |
28 import org.dive4elements.river.jfree.StableXYDifferenceRenderer; | 28 import org.dive4elements.river.jfree.StableXYDifferenceRenderer; |
29 import org.dive4elements.river.jfree.StickyAxisAnnotation; | 29 import org.dive4elements.river.jfree.StickyAxisAnnotation; |
30 import org.dive4elements.river.jfree.Style; | 30 import org.dive4elements.river.jfree.Style; |
31 import org.dive4elements.river.jfree.StyledAreaSeriesCollection; | 31 import org.dive4elements.river.jfree.StyledAreaSeriesCollection; |
32 import org.dive4elements.river.jfree.StyledSeries; | 32 import org.dive4elements.river.jfree.StyledSeries; |
78 | 78 |
79 /** | 79 /** |
80 * The base class for chart creation. It should provide some basic things that | 80 * The base class for chart creation. It should provide some basic things that |
81 * equal in all chart types. | 81 * equal in all chart types. |
82 * | 82 * |
83 * Annotations are added as FLYSAnnotations and come in mutliple basic forms: | 83 * Annotations are added as RiverAnnotations and come in mutliple basic forms: |
84 * TextAnnotations are labels somewhere in data space, StickyAnnotations are | 84 * TextAnnotations are labels somewhere in data space, StickyAnnotations are |
85 * labels of a slice or line in one data dimension (i.e. visualized as label | 85 * labels of a slice or line in one data dimension (i.e. visualized as label |
86 * on a single axis). | 86 * on a single axis). |
87 * | 87 * |
88 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 88 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
133 | 133 |
134 /** Map of datasets ("index"). */ | 134 /** Map of datasets ("index"). */ |
135 protected SortedMap<Integer, AxisDataset> datasets; | 135 protected SortedMap<Integer, AxisDataset> datasets; |
136 | 136 |
137 /** List of annotations to insert in plot. */ | 137 /** List of annotations to insert in plot. */ |
138 protected List<FLYSAnnotation> annotations = new ArrayList<FLYSAnnotation>(); | 138 protected List<RiverAnnotation> annotations = new ArrayList<RiverAnnotation>(); |
139 | 139 |
140 /** | 140 /** |
141 * A mini interface that allows to walk over the YAXIS enums defined in | 141 * A mini interface that allows to walk over the YAXIS enums defined in |
142 * subclasses. | 142 * subclasses. |
143 */ | 143 */ |
181 | 181 |
182 | 182 |
183 /** | 183 /** |
184 * Adds annotations to list. The given annotation will be visible. | 184 * Adds annotations to list. The given annotation will be visible. |
185 */ | 185 */ |
186 public void addAnnotations(FLYSAnnotation annotation) { | 186 public void addAnnotations(RiverAnnotation annotation) { |
187 annotations.add(annotation); | 187 annotations.add(annotation); |
188 } | 188 } |
189 | 189 |
190 /** | 190 /** |
191 * Add a text and a line annotation. | 191 * Add a text and a line annotation. |
447 ChartArea area = new ChartArea( | 447 ChartArea area = new ChartArea( |
448 plot.getDomainAxis(0).getRange(), | 448 plot.getDomainAxis(0).getRange(), |
449 plot.getRangeAxis().getRange()); | 449 plot.getRangeAxis().getRange()); |
450 | 450 |
451 // Walk over all Annotation sets. | 451 // Walk over all Annotation sets. |
452 for (FLYSAnnotation fa: annotations) { | 452 for (RiverAnnotation fa: annotations) { |
453 | 453 |
454 // Access text styling, if any. | 454 // Access text styling, if any. |
455 Document theme = fa.getTheme(); | 455 Document theme = fa.getTheme(); |
456 TextStyle textStyle = null; | 456 TextStyle textStyle = null; |
457 LineStyle lineStyle = null; | 457 LineStyle lineStyle = null; |
618 * @param aandf Artifact and the facet. | 618 * @param aandf Artifact and the facet. |
619 * @param theme Theme document for given annotations. | 619 * @param theme Theme document for given annotations. |
620 * @param visible The visibility of the annotations. | 620 * @param visible The visibility of the annotations. |
621 */ | 621 */ |
622 protected void doAnnotations( | 622 protected void doAnnotations( |
623 FLYSAnnotation annotations, | 623 RiverAnnotation annotations, |
624 ArtifactAndFacet aandf, | 624 ArtifactAndFacet aandf, |
625 Document theme, | 625 Document theme, |
626 boolean visible | 626 boolean visible |
627 ){ | 627 ){ |
628 logger.debug("doAnnotations"); | 628 logger.debug("doAnnotations"); |