Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterMultipleLocationsState.java @ 2560:0d8c97374dc9
WstValueTable: Forget to check in the range method of getMinMaxQ().
flys-artifacts/trunk@4086 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 17 Feb 2012 14:16:50 +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 : |