changeset 3853:8ef59abc0fbf

Attempt at issue860. flys-client/trunk@5593 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 25 Sep 2012 06:50:55 +0000
parents 4aa7216b329a
children 3228d65b0db9
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterMatrixPanel.java
diffstat 2 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Mon Sep 24 13:44:27 2012 +0000
+++ b/flys-client/ChangeLog	Tue Sep 25 06:50:55 2012 +0000
@@ -1,3 +1,10 @@
+2012-09-25	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	Attempt at issue860 (minfo parameterization in helper pane).
+
+	* src/main/java/de/intevation/flys/client/client/ui/ParameterMatrixPanel.java:
+	  Place ParameterMatrix in helper pane if too long.
+
 2012-09-24	Christian Lins	<christian.lins@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/widgets/KMSpinner.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterMatrixPanel.java	Mon Sep 24 13:44:27 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterMatrixPanel.java	Tue Sep 25 06:50:55 2012 +0000
@@ -5,7 +5,9 @@
 import java.util.Set;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.ui.Grid;
 import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Widget;
 
 import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.Label;
@@ -121,6 +123,8 @@
         return layout;
     }
 
+
+    /** Create the main canvas in the "editing" mode. */
     @Override
     public Canvas create(DataList dataList) {
         VLayout v = new VLayout();
@@ -137,13 +141,20 @@
             }
         }
 
-        v.addMember(matrix.create());
+        // If too many items are shown, show it in the helper Panel.
+        if (dataList.getAll().size() > 5) {
+            v.addMember(matrix.create());
+        }
+        else {
+            helperContainer.addMember(matrix.create());
+        }
         v.addMember(getNextButton());
 
         return v;
     }
 
 
+    /** Reaturns a label with description of first Data. */
     protected Canvas createTitle(DataList dataList) {
         Data data = dataList.get(0);
         Label label = new Label(data.getDescription());

http://dive4elements.wald.intevation.org