diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java @ 2033:76cedac30d35

Store additional Parameter in AreaArtifact (paint everything between curve a and b?). flys-artifacts/trunk@3498 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 20 Dec 2011 15:12:11 +0000
parents 3c3693e9c538
children 64dc2997b2dd
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java	Tue Dec 20 15:06:41 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java	Tue Dec 20 15:12:11 2011 +0000
@@ -48,6 +48,9 @@
     /** data item name to access lower curve. */
     protected static final String AREA_CURVE_UNDER = "area.curve_under";
 
+    /** data item name to access whether or not paint over and under. */
+    protected static final String AREA_BETWEEN = "area.between";
+
     /** Name of state. */
     protected static final String AREA_NAME = "area.name";
 
@@ -103,6 +106,7 @@
         // do nothing
     }
 
+
     /**
      * Get name of facets to create.
      */
@@ -110,6 +114,7 @@
         return getDataAsString(FACET_NAME);
     }
 
+
     /**
      * Get dataprovider key for the 'lower' curve (we got that information fed
      * from the client and store it as data).
@@ -120,6 +125,16 @@
 
 
     /**
+     * True if the whole area between the two curves shall be filled.
+     */
+    public boolean getPaintBetween() {
+        String val = getDataAsString(AREA_BETWEEN);
+
+        return val != null && val.equals("true");
+    }
+
+
+    /**
      * Get dataprovider key for the 'upper' curve (we got that information fed
      * from the client and store it as data).
      */
@@ -162,6 +177,7 @@
         return states;
     }
 
+
     /** Trivia. */
     protected State getState(Object context, String stateID) {
         return getCurrentState(null);

http://dive4elements.wald.intevation.org