[PATCH 1 of 2] issue1370: In GWT chart property editor, suppres editing the "W [cm]" axis

Wald Commits scm-commit at wald.intevation.org
Wed Jul 3 11:59:43 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1372844203 -7200
# Node ID 480fb71ab73fd19b94b8dcf669c5f216b88911d2
# Parent  30c6da3bfc86b6321e8a928748fffc6a3f2d73b7
issue1370: In GWT chart property editor, suppres editing the "W [cm]" axis.

diff -r 30c6da3bfc86 -r 480fb71ab73f gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ChartPropertiesEditor.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ChartPropertiesEditor.java	Wed Jul 03 09:34:02 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ChartPropertiesEditor.java	Wed Jul 03 11:36:43 2013 +0200
@@ -188,6 +188,17 @@
         PropertyGroup origPg = (PropertyGroup)orig;
 
         if (pg.getName().equals("axis")) {
+            // Certain axis shall be skipped (W/Q-Diagrams cm-axis especially).
+            String outputName = tab.getOutputName();
+            if (outputName.equals("fix_wq_curve") || outputName.equals("computed_discharge_curve")
+                || outputName.equals("extreme_wq_curve")) {
+                String labelString = ((StringProperty)origPg.getPropertyByName("label")).getValue();
+                if(labelString.equals("W [cm]")) {
+                    VLayout layout = new VLayout();
+                    layout.setHeight(0);
+                    return layout;
+                }
+            }
             Label scale = new Label(MSG.scale() + " :");
             scale.setHeight(25);
             scale.setMargin(2);


More information about the Dive4elements-commits mailing list