Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterLocationState.java @ 2306:cc6b8af44728
Prepare new data input for reference curves 'Ziel' locations.
flys-artifacts/trunk@3976 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 08 Feb 2012 16:12:15 +0000 |
parents | ee7e774ed5b4 |
children |
comparison
equal
deleted
inserted
replaced
2305:ff558d0332e2 | 2306:cc6b8af44728 |
---|---|
2 | 2 |
3 import de.intevation.flys.artifacts.FLYSArtifact; | 3 import de.intevation.flys.artifacts.FLYSArtifact; |
4 | 4 |
5 import de.intevation.flys.utils.FLYSUtils; | 5 import de.intevation.flys.utils.FLYSUtils; |
6 | 6 |
7 import org.apache.log4j.Logger; | |
8 | 7 |
9 /** | 8 /** |
10 * Get me a double startpoint. | 9 * Get me a double (km). |
11 */ | 10 */ |
12 public class EnterLocationState extends InputDoubleState { | 11 public class EnterLocationState extends InputDoubleState { |
13 | 12 |
14 private static final Logger logger = | 13 /** Provoke this kind of provider in the UI. */ |
15 Logger.getLogger(EnterLocationState.class); | |
16 | |
17 | |
18 @Override | 14 @Override |
19 protected String getUIProvider() { | 15 protected String getUIProvider() { |
20 return "location_panel"; | 16 return "location_panel"; |
21 } | 17 } |
22 | 18 |
23 | 19 |
20 /** Allow from min km of river. */ | |
24 @Override | 21 @Override |
25 protected Object getLower(FLYSArtifact flys) { | 22 protected Object getLower(FLYSArtifact flys) { |
26 double[] lowerUpper = FLYSUtils.getRiverMinMax(flys); | 23 double[] lowerUpper = FLYSUtils.getRiverMinMax(flys); |
27 | 24 |
28 return lowerUpper != null | 25 return lowerUpper != null |
29 ? lowerUpper[0] | 26 ? lowerUpper[0] |
30 : 0; | 27 : 0; |
31 } | 28 } |
32 | 29 |
33 | 30 |
31 /** Allow to max km of river. */ | |
34 @Override | 32 @Override |
35 protected Object getUpper(FLYSArtifact flys) { | 33 protected Object getUpper(FLYSArtifact flys) { |
36 double[] lowerUpper = FLYSUtils.getRiverMinMax(flys); | 34 double[] lowerUpper = FLYSUtils.getRiverMinMax(flys); |
37 | 35 |
38 return lowerUpper != null | 36 return lowerUpper != null |