Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/LocationSelect.java @ 2235:ee5310134463
Cosmetics/care/refac.
flys-artifacts/trunk@3879 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 02 Feb 2012 13:23:55 +0000 |
parents | 6e67b5dd8c4c |
children | d9af29a4bb85 |
comparison
equal
deleted
inserted
replaced
2234:46ec09c7f578 | 2235:ee5310134463 |
---|---|
25 */ | 25 */ |
26 public class LocationSelect extends LocationDistanceSelect { | 26 public class LocationSelect extends LocationDistanceSelect { |
27 | 27 |
28 /** The logger used in this class.*/ | 28 /** The logger used in this class.*/ |
29 private static Logger logger = Logger.getLogger(LocationSelect.class); | 29 private static Logger logger = Logger.getLogger(LocationSelect.class); |
30 | |
31 /** The name of the StateData object that stores the location string.*/ | |
32 public static final String FIELD_LOCATIONS = "ld_locations"; | |
33 | 30 |
34 | 31 |
35 public LocationSelect() { | 32 public LocationSelect() { |
36 } | 33 } |
37 | 34 |
60 } | 57 } |
61 else { | 58 else { |
62 logger.warn("Could not read min/max distance values!"); | 59 logger.warn("Could not read min/max distance values!"); |
63 } | 60 } |
64 | 61 |
65 if (name.equals(FIELD_LOCATIONS)) { | 62 if (name.equals(LOCATIONS)) { |
66 Element min = createItem( | 63 Element min = createItem( |
67 cr, | 64 cr, |
68 new String[] {"min", new Double(minVal).toString()}); | 65 new String[] {"min", new Double(minVal).toString()}); |
69 | 66 |
70 Element max = createItem( | 67 Element max = createItem( |
83 throws IllegalArgumentException | 80 throws IllegalArgumentException |
84 { | 81 { |
85 logger.debug("LocationSelect.validate"); | 82 logger.debug("LocationSelect.validate"); |
86 | 83 |
87 FLYSArtifact flys = (FLYSArtifact) artifact; | 84 FLYSArtifact flys = (FLYSArtifact) artifact; |
88 StateData data = getData(flys, FIELD_LOCATIONS); | 85 StateData data = getData(flys, LOCATIONS); |
89 | 86 |
90 String locationStr = data != null | 87 String locationStr = data != null |
91 ? (String) data.getValue() | 88 ? (String) data.getValue() |
92 : null; | 89 : null; |
93 | 90 |