changeset 5921:17b07104d093

issue1259: Grey out inputhelper Ws when Qs are to be chosen and vice versa.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 08 May 2013 10:37:25 +0200
parents 22dbf92a4f18
children 8ed9b1edace6
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQAdaptedInputPanel.java
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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(";");
 

http://dive4elements.wald.intevation.org