diff flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java @ 912:2c8f1112be37

Rollback for input assistance of "Q/D" table. The selectable icon columns are visible in all modes except of "Q" input mode. (Issue203) flys-client/trunk@2771 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 16 Sep 2011 09:35:42 +0000
parents 1e08a5b0add9
children 1fae113b93fd
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java	Thu Sep 15 17:01:12 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java	Fri Sep 16 09:35:42 2011 +0000
@@ -22,7 +22,6 @@
     /** The interface that provides the image resources. */
     private FLYSImages IMAGES = GWT.create(FLYSImages.class);
 
-
     public QDTable() {
         setWidth100();
         setHeight100();
@@ -33,6 +32,16 @@
         setShowRecordComponentsByCell(true);
         setEmptyMessage(MESSAGE.empty_table());
 
+        ListGridField addMax = new ListGridField("max", "");
+        addMax.setType(ListGridFieldType.ICON);
+        addMax.setWidth(30);
+        addMax.setCellIcon(IMAGES.markerRed().getURL());
+
+        ListGridField addMin = new ListGridField("min", "");
+        addMin.setType(ListGridFieldType.ICON);
+        addMin.setWidth(30);
+        addMin.setCellIcon(IMAGES.markerGreen().getURL());
+
         ListGridField name = new ListGridField("name", MESSAGE.discharge());
         name.setType(ListGridFieldType.TEXT);
         name.setWidth("*");
@@ -45,7 +54,19 @@
         value.setType(ListGridFieldType.FLOAT);
         value.setWidth("20%");
 
-        setFields(name, type, value);
+        setFields(addMax, addMin, name, type, value);
     }
+
+    public void hideIconFields () {
+        hideField("max");
+        hideField("min");
+    }
+
+
+    public void showIconFields() {
+        showField("max");
+        showField("min");
+    }
+
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org