Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java @ 1921:d99fdc234da1
Add annotaitons for STATIC_WKMS_INTERPOL facets in Computed Discharge Curves.
flys-artifacts/trunk@3281 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 17 Nov 2011 09:18:03 +0000 |
parents | 6b7557ffe2f8 |
children | 7c52e9cb2a72 |
comparison
equal
deleted
inserted
replaced
1920:346044bd523d | 1921:d99fdc234da1 |
---|---|
119 || name.equals(MAINVALUES_W) | 119 || name.equals(MAINVALUES_W) |
120 ) { | 120 ) { |
121 doAnnotations((FLYSAnnotation) | 121 doAnnotations((FLYSAnnotation) |
122 f.getData(artifact, context), facet, attr, visible); | 122 f.getData(artifact, context), facet, attr, visible); |
123 } | 123 } |
124 else if (name.equals(STATIC_WKMS_INTERPOL)) { | |
125 doWAnnotations(f.getData(artifact, context), facet, attr, visible); | |
126 } | |
124 else { | 127 else { |
125 logger.warn("Unknown facet type for computed discharge: " + name); | 128 logger.warn("Unknown facet type for computed discharge: " + name); |
126 return; | 129 return; |
127 } | 130 } |
128 } | 131 } |
183 } | 186 } |
184 | 187 |
185 doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), | 188 doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), |
186 facet, theme, visible); | 189 facet, theme, visible); |
187 } | 190 } |
191 | |
192 /** | |
193 * Add W-Annotations to plot. | |
194 * @param wqkms actual data | |
195 * @param theme theme to use. | |
196 */ | |
197 protected void doWAnnotations( | |
198 Object wqkms, | |
199 Facet facet, | |
200 Document theme, | |
201 boolean visible | |
202 ) { | |
203 List<XYTextAnnotation> xy = new ArrayList<XYTextAnnotation>(); | |
204 double [][] data = (double [][]) wqkms; | |
205 for (int i = 0; i< data[0].length; i++) { | |
206 xy.add(new StickyAxisAnnotation(facet.getDescription(), | |
207 (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS)); | |
208 } | |
209 | |
210 doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), | |
211 facet, theme, visible); | |
212 } | |
188 } | 213 } |
189 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 214 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |