Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterLocationState.java @ 3818:dc18457b1cef
merged flys-artifacts/pre2.7-2012-03-16
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:59 +0200 |
parents | cc6b8af44728 |
children |
comparison
equal
deleted
inserted
replaced
2456:60ab1054069d | 3818:dc18457b1cef |
---|---|
1 package de.intevation.flys.artifacts.states; | |
2 | |
3 import de.intevation.flys.artifacts.FLYSArtifact; | |
4 | |
5 import de.intevation.flys.utils.FLYSUtils; | |
6 | |
7 | |
8 /** | |
9 * Get me a double (km). | |
10 */ | |
11 public class EnterLocationState extends InputDoubleState { | |
12 | |
13 /** Provoke this kind of provider in the UI. */ | |
14 @Override | |
15 protected String getUIProvider() { | |
16 return "location_panel"; | |
17 } | |
18 | |
19 | |
20 /** Allow from min km of river. */ | |
21 @Override | |
22 protected Object getLower(FLYSArtifact flys) { | |
23 double[] lowerUpper = FLYSUtils.getRiverMinMax(flys); | |
24 | |
25 return lowerUpper != null | |
26 ? lowerUpper[0] | |
27 : 0; | |
28 } | |
29 | |
30 | |
31 /** Allow to max km of river. */ | |
32 @Override | |
33 protected Object getUpper(FLYSArtifact flys) { | |
34 double[] lowerUpper = FLYSUtils.getRiverMinMax(flys); | |
35 | |
36 return lowerUpper != null | |
37 ? lowerUpper[1] | |
38 : 0; | |
39 } | |
40 } | |
41 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |