annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterMultipleLocationsState.java @ 3446:5325040d35e3

Adjusted i18n. flys-artifacts/trunk@5109 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 23 Jul 2012 15:12:25 +0000
parents 5642a83420f2
children 33bfc01410fb
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
3076
5642a83420f2 FLYS artifacts: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2314
diff changeset
17
2312
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