[Dive4elements-commits] [PATCH 2 of 2] issue1259: Grey out inputhelper Ws when Qs are to be chosen and vice versa

Wald Commits scm-commit at wald.intevation.org
Wed May 8 10:29:51 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1368002245 -7200
# Node ID 17b07104d0931e4c5740681c248fb58ce0774edd
# Parent  22dbf92a4f181383c58e0f00ce4b395bff14b479
issue1259: Grey out inputhelper Ws when Qs are to be chosen and vice versa.

diff -r 22dbf92a4f18 -r 17b07104d093 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQAdaptedInputPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQAdaptedInputPanel.java	Tue May 07 15:47:07 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQAdaptedInputPanel.java	Wed May 08 10:37:25 2013 +0200
@@ -623,9 +623,11 @@
 
                 if(form.getValueAsString(FIELD_WQ_MODE).contains("Q")) {
                     tabs.selectTab(0);
+                    enableQTabs();
                 }
                 else {
                     tabs.selectTab(1);
+                    enableWTabs();
                 }
             }
         });
@@ -639,6 +641,22 @@
     }
 
 
+    public void enableWTabs() {
+        for (int i = 0; i < doubleArrayPanels.size(); i++) {
+            tabs.disableTab(2*i);
+            tabs.enableTab(2*i+1);
+        }
+    }
+
+
+    public void enableQTabs() {
+        for (int i = 0; i < doubleArrayPanels.size(); i++) {
+            tabs.enableTab(2*i);
+            tabs.disableTab(2*i+1);
+        }
+    }
+
+
     public String createLineTitle(String key) {
         String[] splitted = key.split(";");
 


More information about the Dive4elements-commits mailing list