comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.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 e2124ca11adb
children e123c5643f23
comparison
equal deleted inserted replaced
2324:867ebe191799 2325:1fcaeced48f2
113 } 113 }
114 else if (name.equals(STATIC_WQ)) { 114 else if (name.equals(STATIC_WQ)) {
115 doWQOut(artifactFacet.getData(context), facet, attr, visible); 115 doWQOut(artifactFacet.getData(context), facet, attr, visible);
116 } 116 }
117 else if (name.equals(STATIC_WQ_ANNOTATIONS)) { 117 else if (name.equals(STATIC_WQ_ANNOTATIONS)) {
118 doWQAnnotations(artifactFacet.getData(context), facet, attr, visible); 118 doWQAnnotations(
119 artifactFacet.getData(context),
120 artifactFacet,
121 attr,
122 visible);
119 } 123 }
120 else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q) 124 else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q)
121 || name.equals(MAINVALUES_Q) 125 || name.equals(MAINVALUES_Q)
122 || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) 126 || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W)
123 || name.equals(MAINVALUES_W) 127 || name.equals(MAINVALUES_W)
124 ) { 128 ) {
125 doAnnotations((FLYSAnnotation) 129 doAnnotations((FLYSAnnotation)
126 artifactFacet.getData(context), facet, attr, visible); 130 artifactFacet.getData(context), artifactFacet, attr, visible);
127 } 131 }
128 else if (name.equals(STATIC_WKMS_INTERPOL)) { 132 else if (name.equals(STATIC_WKMS_INTERPOL)) {
129 doWAnnotations(artifactFacet.getData(context), facet, attr, visible); 133 doWAnnotations(
134 artifactFacet.getData(context),
135 artifactFacet,
136 attr,
137 visible);
130 } 138 }
131 else if (FacetTypes.IS.MANUALPOINTS(name)) { 139 else if (FacetTypes.IS.MANUALPOINTS(name)) {
132 doPoints(artifactFacet.getData(context), 140 doPoints(artifactFacet.getData(context),
133 artifactFacet.getFacetDescription(), 141 artifactFacet,
134 attr, visible, YAXIS.W.idx); 142 attr, visible, YAXIS.W.idx);
135 } 143 }
136 else { 144 else {
137 logger.warn("Unknown facet type for computed discharge: " + name); 145 logger.warn("Unknown facet type for computed discharge: " + name);
138 return; 146 return;
181 * @param wqkms actual data 189 * @param wqkms actual data
182 * @param theme theme to use. 190 * @param theme theme to use.
183 */ 191 */
184 protected void doWQAnnotations( 192 protected void doWQAnnotations(
185 Object wqkms, 193 Object wqkms,
186 Facet facet, 194 ArtifactAndFacet aandf,
187 Document theme, 195 Document theme,
188 boolean visible 196 boolean visible
189 ) { 197 ) {
190 List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>(); 198 List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>();
191 double [][] data = (double [][]) wqkms; 199 double [][] data = (double [][]) wqkms;
192 for (int i = 0; i< data[0].length; i++) { 200 for (int i = 0; i< data[0].length; i++) {
193 xy.add(new StickyAxisAnnotation(facet.getDescription(), 201 xy.add(new StickyAxisAnnotation(aandf.getFacetDescription(),
194 (float) data[0][i], StickyAxisAnnotation.SimpleAxis.X_AXIS)); 202 (float) data[0][i], StickyAxisAnnotation.SimpleAxis.X_AXIS));
195 xy.add(new StickyAxisAnnotation(facet.getDescription(), 203 xy.add(new StickyAxisAnnotation(aandf.getFacetDescription(),
196 (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS)); 204 (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS));
197 } 205 }
198 206
199 doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), 207 doAnnotations(new FLYSAnnotation(aandf.getFacetDescription(), xy),
200 facet, theme, visible); 208 aandf, theme, visible);
201 } 209 }
202 210
203 211
204 /** 212 /**
205 * Add W-Annotations to plot. 213 * Add W-Annotations to plot.
206 * @param wqkms actual data 214 * @param wqkms actual data
207 * @param theme theme to use. 215 * @param theme theme to use.
208 */ 216 */
209 protected void doWAnnotations( 217 protected void doWAnnotations(
210 Object wqkms, 218 Object wqkms,
211 Facet facet, 219 ArtifactAndFacet aandf,
212 Document theme, 220 Document theme,
213 boolean visible 221 boolean visible
214 ) { 222 ) {
223 Facet facet = aandf.getFacet();
224
215 List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>(); 225 List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>();
216 double [][] data = (double [][]) wqkms; 226 double [][] data = (double [][]) wqkms;
217 for (int i = 0; i< data[0].length; i++) { 227 for (int i = 0; i< data[0].length; i++) {
218 xy.add(new StickyAxisAnnotation(facet.getDescription(), 228 xy.add(new StickyAxisAnnotation(aandf.getFacetDescription(),
219 (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS)); 229 (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS));
220 } 230 }
221 231
222 doAnnotations(new FLYSAnnotation(facet.getDescription(), xy), 232 doAnnotations(new FLYSAnnotation(facet.getDescription(), xy),
223 facet, theme, visible); 233 aandf, theme, visible);
224 } 234 }
225 } 235 }
226 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 236 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org