Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java @ 3212:abc2db630815
Work in generalized annotations for chart generators
flys-artifacts/trunk@4835 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 29 Jun 2012 12:35:06 +0000 |
parents | 12440c6b8b66 |
children | ed07dd55f487 |
comparison
equal
deleted
inserted
replaced
3211:a1a434c163a4 | 3212:abc2db630815 |
---|---|
53 import de.intevation.flys.artifacts.FLYSArtifact; | 53 import de.intevation.flys.artifacts.FLYSArtifact; |
54 import de.intevation.flys.artifacts.resources.Resources; | 54 import de.intevation.flys.artifacts.resources.Resources; |
55 import de.intevation.flys.jfree.Bounds; | 55 import de.intevation.flys.jfree.Bounds; |
56 import de.intevation.flys.jfree.DoubleBounds; | 56 import de.intevation.flys.jfree.DoubleBounds; |
57 import de.intevation.flys.jfree.EnhancedLineAndShapeRenderer; | 57 import de.intevation.flys.jfree.EnhancedLineAndShapeRenderer; |
58 import de.intevation.flys.jfree.FLYSAnnotation; | |
58 import de.intevation.flys.jfree.StableXYDifferenceRenderer; | 59 import de.intevation.flys.jfree.StableXYDifferenceRenderer; |
59 import de.intevation.flys.jfree.StyledAreaSeriesCollection; | 60 import de.intevation.flys.jfree.StyledAreaSeriesCollection; |
60 import de.intevation.flys.jfree.Style; | 61 import de.intevation.flys.jfree.Style; |
61 import de.intevation.flys.jfree.StyledSeries; | 62 import de.intevation.flys.jfree.StyledSeries; |
62 import de.intevation.flys.utils.FLYSUtils; | 63 import de.intevation.flys.utils.FLYSUtils; |
111 protected Settings settings; | 112 protected Settings settings; |
112 | 113 |
113 /** Map of datasets ("index"). */ | 114 /** Map of datasets ("index"). */ |
114 protected SortedMap<Integer, AxisDataset> datasets; | 115 protected SortedMap<Integer, AxisDataset> datasets; |
115 | 116 |
116 | 117 /** List of annotations to insert in plot. */ |
118 protected List<FLYSAnnotation> annotations; | |
117 | 119 |
118 /** | 120 /** |
119 * A mini interface that allows to walk over the YAXIS enums defined in | 121 * A mini interface that allows to walk over the YAXIS enums defined in |
120 * subclasses. | 122 * subclasses. |
121 */ | 123 */ |
155 */ | 157 */ |
156 public ChartGenerator() { | 158 public ChartGenerator() { |
157 datasets = new TreeMap<Integer, AxisDataset>(); | 159 datasets = new TreeMap<Integer, AxisDataset>(); |
158 } | 160 } |
159 | 161 |
162 | |
163 /** | |
164 * Adds annotations to list. The given annotation will be visible. | |
165 */ | |
166 public void addAnnotations(FLYSAnnotation annotation) { | |
167 if (annotations == null) { | |
168 annotations = new ArrayList<FLYSAnnotation>(); | |
169 } | |
170 | |
171 annotations.add(annotation); | |
172 } | |
160 | 173 |
161 | 174 |
162 /** | 175 /** |
163 * This method needs to be implemented by concrete subclasses to create new | 176 * This method needs to be implemented by concrete subclasses to create new |
164 * instances of JFreeChart. | 177 * instances of JFreeChart. |