Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/ChartServiceHelper.java @ 2906:1780841d79af
Added navigation to fix analysis charts.
flys-client/trunk@4673 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 15 Jun 2012 12:13:09 +0000 |
parents | ab8eb2f544f2 |
children |
comparison
equal
deleted
inserted
replaced
2905:51ed89b754ae | 2906:1780841d79af |
---|---|
54 | 54 |
55 appendChartSize(req, attributes, ec); | 55 appendChartSize(req, attributes, ec); |
56 appendFormat(req, attributes, ec); | 56 appendFormat(req, attributes, ec); |
57 appendXRange(req, attributes, ec); | 57 appendXRange(req, attributes, ec); |
58 appendYRange(req, attributes, ec); | 58 appendYRange(req, attributes, ec); |
59 appendCurrentKm(req, attributes, ec); | |
59 | 60 |
60 doc.appendChild(attributes); | 61 doc.appendChild(attributes); |
61 | 62 |
62 return doc; | 63 return doc; |
63 } | 64 } |
181 Element format = ec.create("format"); | 182 Element format = ec.create("format"); |
182 ec.addAttr(format, "value", formatStr, true); | 183 ec.addAttr(format, "value", formatStr, true); |
183 | 184 |
184 attributes.appendChild(format); | 185 attributes.appendChild(format); |
185 } | 186 } |
187 | |
188 | |
189 /** | |
190 * This method extracts the current km for the chart from request object and | |
191 * appends this km - if it exists - to the attribute document used to | |
192 * adjust the chart settings. | |
193 * | |
194 * @param req The request object that might contain the chart size. | |
195 * @param doc The attribute document used to adjust chart settings. | |
196 * @param ec The ElementCreator that might be used to create new Elements. | |
197 */ | |
198 protected static void appendCurrentKm( | |
199 Map<String, String> req, | |
200 Element attributes, | |
201 ElementCreator ec) | |
202 { | |
203 logger.debug("ChartServiceHelper.appendCurrentKm"); | |
204 | |
205 Element currentKm = ec.create("currentKm"); | |
206 | |
207 String km = req.get("km"); | |
208 | |
209 if (km != null) { | |
210 ec.addAttr(currentKm, "km", km, true); | |
211 | |
212 attributes.appendChild(currentKm); | |
213 } | |
214 } | |
215 | |
186 } | 216 } |
187 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 217 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |