Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MultipleLocationPanel.java @ 1618:95b821d63db3
Cosmetics.
flys-client/trunk@3990 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 09 Feb 2012 10:55:28 +0000 |
parents | f13a7c126f24 |
children | 242b5c230707 |
comparison
equal
deleted
inserted
replaced
1617:f13a7c126f24 | 1618:95b821d63db3 |
---|---|
202 if (!locationPanel.validateForm()) { | 202 if (!locationPanel.validateForm()) { |
203 errors.add(MSG.wrongFormat()); | 203 errors.add(MSG.wrongFormat()); |
204 return errors; | 204 return errors; |
205 } | 205 } |
206 | 206 |
207 double[] values = getLocationValues(); | 207 double[] lValues = getLocationValues(); |
208 double[] good = new double[values.length]; | 208 double[] good = new double[lValues.length]; |
209 int idx = 0; | 209 int idx = 0; |
210 | 210 |
211 for (double value: values) { | 211 for (double value: lValues) { |
212 if (value < min || value > max) { | 212 if (value < min || value > max) { |
213 String tmp = MSG.error_validate_range(); | 213 String tmp = MSG.error_validate_range(); |
214 tmp = tmp.replace("$1", nf.format(value)); | 214 tmp = tmp.replace("$1", nf.format(value)); |
215 tmp = tmp.replace("$2", nf.format(min)); | 215 tmp = tmp.replace("$2", nf.format(min)); |
216 tmp = tmp.replace("$3", nf.format(max)); | 216 tmp = tmp.replace("$3", nf.format(max)); |
239 * | 239 * |
240 * @return the selected/inserted data in feedable form. | 240 * @return the selected/inserted data in feedable form. |
241 */ | 241 */ |
242 public Data[] getData() { | 242 public Data[] getData() { |
243 saveLocationValues(locationPanel); | 243 saveLocationValues(locationPanel); |
244 double[] values = getLocationValues(); | 244 double[] lValues = getLocationValues(); |
245 Data[] data = new Data[2]; | 245 Data[] data = new Data[2]; |
246 boolean first = true; | 246 boolean first = true; |
247 String valueString = ""; | 247 String valueString = ""; |
248 | 248 |
249 for (int i = 0; i < values.length; i++) { | 249 for (int i = 0; i < lValues.length; i++) { |
250 if (!first) valueString += " "; | 250 if (!first) valueString += " "; |
251 else first = false; | 251 else first = false; |
252 valueString += Double.valueOf(values[i]).toString(); | 252 valueString += Double.valueOf(lValues[i]).toString(); |
253 } | 253 } |
254 | 254 |
255 data[0] = createDataArray(getDataItemName(), valueString); | 255 data[0] = createDataArray(getDataItemName(), valueString); |
256 | 256 |
257 data[1] = createDataArray("ld_mode", "locations"); | 257 data[1] = createDataArray("ld_mode", "locations"); |