changeset 6048:caf9d989bd84

Fix waterlevel classes and change defaults for them. If to is 0 then we create a class that goes to 9999 If step is 0 then we only have a single step >= 0 The defaults are now from 0, to 2m with a step of 0.5
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 17 May 2013 17:56:20 +0200
parents 1bb4b51ff1e6
children 2f50591aacc7
files artifacts/src/main/java/org/dive4elements/river/utils/ThemeUtil.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WaterlevelGroundPanel.java
diffstat 2 files changed, 4 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/utils/ThemeUtil.java	Thu May 16 20:11:53 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/ThemeUtil.java	Fri May 17 17:56:20 2013 +0200
@@ -677,24 +677,9 @@
         Color startColor = strStartColor != null ? parseColor(strStartColor) : new Color(178, 201, 215);
         String strEndColor = XMLUtils.xpathString(theme, XPATH_WSPLGEN_ENDCOLOR, null);
         Color endColor = strEndColor != null? parseColor(strEndColor) : new Color(2, 27, 42);
-/*
-        String strNumClasses = XMLUtils.xpathString(theme, XPATH_WSPLGEN_NUMCLASSES, null);
-        int numClasses;
-        if (strNumClasses != null) {
-            numClasses = Integer.parseInt(strNumClasses);
-        }
-        else {
-            numClasses = 5;
-            logger.warn("createDynamicMapserverStyle(): strNumClasses is null");
-        }
 
-        if (numClasses < 5) {
-            numClasses = 5;
-        }
-        else if (numClasses > 20) {
-            numClasses = 20;
-        }*/
-
+        to = to != 0 ? to : 9999;
+        step = step != 0 ? step : to;
 
         int numClasses = (int)((to - from) / step);
 
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WaterlevelGroundPanel.java	Thu May 16 20:11:53 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WaterlevelGroundPanel.java	Fri May 17 17:56:20 2013 +0200
@@ -108,13 +108,13 @@
 
     @Override
     protected double getDefaultTo() {
-        return 0;
+        return 2;
     }
 
 
     @Override
     protected double getDefaultStep() {
-        return 0;
+        return 0.5;
     }
 
 

http://dive4elements.wald.intevation.org