annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterMultipleLocationsState.java @ 2792:fe987587ebc9

Merged revisions 4539-4540,4543,4545-4546 via svnmerge from file:///home/clients/bsh/bsh-generischer-viewer/Material/SVN/flys-artifacts/trunk ........ r4539 | teichmann | 2012-05-27 20:02:13 +0200 (So, 27 Mai 2012) | 1 line FixA: Added forgotten csv/report facets/generators to conf. ........ r4540 | teichmann | 2012-05-27 20:11:31 +0200 (So, 27 Mai 2012) | 1 line FixA: Fixed class cast bug in report facet. ........ r4543 | teichmann | 2012-05-28 20:35:01 +0200 (Mo, 28 Mai 2012) | 1 line FixA: Added facet to return delta w/t as CSV ........ r4545 | teichmann | 2012-05-28 22:59:27 +0200 (Mo, 28 Mai 2012) | 1 line FixA: Made Delta W/t calculation finally work ........ r4546 | teichmann | 2012-05-28 23:34:24 +0200 (Mo, 28 Mai 2012) | 1 line FixA: corrected fitting (Q->W instead W->Q). ........ flys-artifacts/tags/2.7@4547 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 29 May 2012 04:58:29 +0000
parents f4ca234ba214
children 5642a83420f2
rev   line source
2306
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.states;
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2
2312
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
3 import de.intevation.artifacts.CallContext;
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
4 import de.intevation.artifacts.common.utils.StringUtils;
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
5
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
6
2306
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7 /**
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
8 * Get me doubles (km).
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9 */
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10 public class EnterMultipleLocationsState extends EnterLocationState {
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 @Override
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13 protected String getUIProvider() {
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14 return "multi_location_panel";
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 }
2312
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
16
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
17
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
18 /** Deal with multiple double values. */
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
19 @Override
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
20 protected String getLabelFor(
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
21 CallContext cc,
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
22 String name,
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
23 String value,
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
24 String type
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
25 ) {
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
26 String label = "";
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
27 String[] vals = value.split(" ");
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
28 for (int i = 0; i < vals.length; i++) {
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
29 vals[i] = super.getLabelFor(cc, name, vals[i], type);
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
30 }
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
31
2314
f4ca234ba214 Fix call to StringUtils.join .
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2312
diff changeset
32 return StringUtils.join(" ", vals);
2312
f911ddd93f58 Format multiple double values with a locale.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2306
diff changeset
33 }
2306
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34 }
cc6b8af44728 Prepare new data input for reference curves 'Ziel' locations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org