Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterMultipleLocationsState.java @ 3318:dbe2f85bf160
merged flys-artifacts/2.8
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:35 +0200 |
parents | 5642a83420f2 |
children | 33bfc01410fb |
comparison
equal
deleted
inserted
replaced
2987:98c7a46ec5ae | 3318:dbe2f85bf160 |
---|---|
1 package de.intevation.flys.artifacts.states; | |
2 | |
3 import de.intevation.artifacts.CallContext; | |
4 import de.intevation.artifacts.common.utils.StringUtils; | |
5 | |
6 | |
7 /** | |
8 * Get me doubles (km). | |
9 */ | |
10 public class EnterMultipleLocationsState extends EnterLocationState { | |
11 | |
12 @Override | |
13 protected String getUIProvider() { | |
14 return "multi_location_panel"; | |
15 } | |
16 | |
17 | |
18 /** Deal with multiple double values. */ | |
19 @Override | |
20 protected String getLabelFor( | |
21 CallContext cc, | |
22 String name, | |
23 String value, | |
24 String type | |
25 ) { | |
26 String label = ""; | |
27 String[] vals = value.split(" "); | |
28 for (int i = 0; i < vals.length; i++) { | |
29 vals[i] = super.getLabelFor(cc, name, vals[i], type); | |
30 } | |
31 | |
32 return StringUtils.join(" ", vals); | |
33 } | |
34 } | |
35 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |