Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java @ 2161:c68f4f227c09
Somewhat unified Annotation handling, use jfreechart-house-toolkit instead of custom StickyAxisAnnotation.
flys-artifacts/trunk@3747 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 23 Jan 2012 10:44:34 +0000 |
parents | a026d005accd |
children | e2124ca11adb |
comparison
equal
deleted
inserted
replaced
2160:8428de5846e8 | 2161:c68f4f227c09 |
---|---|
4 import java.util.ArrayList; | 4 import java.util.ArrayList; |
5 | 5 |
6 import org.apache.log4j.Logger; | 6 import org.apache.log4j.Logger; |
7 | 7 |
8 import org.w3c.dom.Document; | 8 import org.w3c.dom.Document; |
9 | |
10 import org.jfree.chart.annotations.XYTextAnnotation; | |
11 | 9 |
12 import org.jfree.chart.JFreeChart; | 10 import org.jfree.chart.JFreeChart; |
13 import org.jfree.chart.title.TextTitle; | 11 import org.jfree.chart.title.TextTitle; |
14 import org.jfree.data.xy.XYSeries; | 12 import org.jfree.data.xy.XYSeries; |
15 | 13 |
181 Object wqkms, | 179 Object wqkms, |
182 Facet facet, | 180 Facet facet, |
183 Document theme, | 181 Document theme, |
184 boolean visible | 182 boolean visible |
185 ) { | 183 ) { |
186 List<XYTextAnnotation> xy = new ArrayList<XYTextAnnotation>(); | 184 List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>(); |
187 double [][] data = (double [][]) wqkms; | 185 double [][] data = (double [][]) wqkms; |
188 for (int i = 0; i< data[0].length; i++) { | 186 for (int i = 0; i< data[0].length; i++) { |
189 xy.add(new StickyAxisAnnotation(facet.getDescription(), | 187 xy.add(new StickyAxisAnnotation(facet.getDescription(), |
190 (float) data[0][i], StickyAxisAnnotation.SimpleAxis.X_AXIS)); | 188 (float) data[0][i], StickyAxisAnnotation.SimpleAxis.X_AXIS)); |
191 xy.add(new StickyAxisAnnotation(facet.getDescription(), | 189 xy.add(new StickyAxisAnnotation(facet.getDescription(), |
206 Object wqkms, | 204 Object wqkms, |
207 Facet facet, | 205 Facet facet, |
208 Document theme, | 206 Document theme, |
209 boolean visible | 207 boolean visible |
210 ) { | 208 ) { |
211 List<XYTextAnnotation> xy = new ArrayList<XYTextAnnotation>(); | 209 List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>(); |
212 double [][] data = (double [][]) wqkms; | 210 double [][] data = (double [][]) wqkms; |
213 for (int i = 0; i< data[0].length; i++) { | 211 for (int i = 0; i< data[0].length; i++) { |
214 xy.add(new StickyAxisAnnotation(facet.getDescription(), | 212 xy.add(new StickyAxisAnnotation(facet.getDescription(), |
215 (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS)); | 213 (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS)); |
216 } | 214 } |