changeset 1462:a346db45c830

Feed new parameter to area artifact, fix reversed assignment of under/over curves. flys-client/trunk@3501 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 20 Dec 2011 15:18:07 +0000
parents 83ed39d1083d
children 14ce1c2a9f6c
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java
diffstat 2 files changed, 28 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Tue Dec 20 15:15:32 2011 +0000
+++ b/flys-client/ChangeLog	Tue Dec 20 15:18:07 2011 +0000
@@ -1,3 +1,9 @@
+2011-12-20	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java:
+	  Feed artifact with new area.between parameter, fix inversed
+	  assignment of 'over' and 'under'.
+
 2011-12-20  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/shared/model/BooleanProperty.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java	Tue Dec 20 15:15:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java	Tue Dec 20 15:18:07 2011 +0000
@@ -139,9 +139,14 @@
 
     /**
      * Tell an area artifact where to get the upper and lower curve from.
-     * @param over if null, something
+     * @param artifact UUID of area-artifact.
      */
-    public void feedTellArea(final String artifact, Theme under, Theme over) {
+    public void feedTellArea(
+        final String artifact,
+        Theme under,
+        Theme over,
+        boolean between
+    ) {
 
         Data[] feedData;
 
@@ -154,7 +159,9 @@
                 DefaultData.createSimpleStringData("area.name",
                     over.getDescription() + " / " + under.getDescription()),
                 DefaultData.createSimpleStringData("area.facet",
-                    getAreaFacetName())
+                    getAreaFacetName()),
+                DefaultData.createSimpleStringData("area.between",
+                    (between)? "true" : "false")
             };
             GWT.log("Have over and under");
         }
@@ -165,7 +172,9 @@
                 DefaultData.createSimpleStringData("area.name",
                     under.getDescription() + " / " + MSG.getString("x_axis")),
                 DefaultData.createSimpleStringData("area.facet",
-                    getAreaFacetName())
+                    getAreaFacetName()),
+                DefaultData.createSimpleStringData("area.between",
+                    (between)? "true" : "false")
             };
             GWT.log("Have under only");
         }
@@ -176,7 +185,9 @@
                 DefaultData.createSimpleStringData("area.name",
                     MSG.getString("x_axis") + " / " + over.getDescription()),
                 DefaultData.createSimpleStringData("area.facet",
-                    getAreaFacetName())
+                    getAreaFacetName()),
+                DefaultData.createSimpleStringData("area.between",
+                    (between)? "true" : "false")
             };
             GWT.log("Have over only");
         }
@@ -211,12 +222,13 @@
     /**
      * Create and parameterize a new area artifact.
      * @param under
-     * @param over if null, something.
+     * @param over if null, against axis.
+     * @param between if true, ignore under/over order.
      */
     public void createAreaArtifact(
-        final Theme under,
-        final Theme over,
-        boolean between
+        final Theme   over,
+        final Theme   under,
+        final boolean between
     ) {
         Config config = Config.getInstance();
         String locale = config.getLocale();
@@ -243,7 +255,7 @@
                     GWT.log("Success, created area artifact: "
                         + artifacts[0].getUuid());
                     // Now, feed the artifact with the relevant data.
-                    feedTellArea(artifacts[0].getUuid(), under, over);
+                    feedTellArea(artifacts[0].getUuid(), under, over, between);
                 }
             }
             );

http://dive4elements.wald.intevation.org