changeset 9108:f5b55b383ef9

VegZones Layout Nachtrag
author gernotbelger
date Tue, 29 May 2018 18:17:55 +0200
parents 41f4bc83aa7a
children 59cf6e6a452d
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTableEditPanel.java
diffstat 2 files changed, 9 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java	Tue May 29 15:19:03 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java	Tue May 29 18:17:55 2018 +0200
@@ -75,6 +75,7 @@
         final IntegerRangeValidator validator = new IntegerRangeValidator();
         validator.setMin(0);
         validator.setMax(365);
+        validator.setErrorMessage(this.MSG.uinfo_vegetation_zones_validation_range());
 
         fromField.setValidators(validator);
         fromField.setWidth(80);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTableEditPanel.java	Tue May 29 15:19:03 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/VegetationzonesTableEditPanel.java	Tue May 29 18:17:55 2018 +0200
@@ -19,8 +19,8 @@
 import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.grid.ListGrid;
 import com.smartgwt.client.widgets.grid.ListGridRecord;
-import com.smartgwt.client.widgets.layout.HLayout;
 import com.smartgwt.client.widgets.layout.Layout;
+import com.smartgwt.client.widgets.layout.VLayout;
 
 public class VegetationzonesTableEditPanel extends AbstractVegZonesTablePanel {
     private static final long serialVersionUID = 1L;
@@ -37,19 +37,17 @@
         final ListGrid elements = super.createTable(root, data, 450, true);
 
         this.vegzone = PanelHelper.createItem("uinfo_vegetation_zone_label", this.MSG.uinfo_vegetation_zone_label(), 200);
-        this.start = PanelHelper.createIntegerItem("uinfo_vegetation_zones_from", this.MSG.uinfo_vegetation_zones_from(), 40);
-        this.end = PanelHelper.createIntegerItem("uinfo_vegetation_zones_to", this.MSG.uinfo_vegetation_zones_to(), 40);
-        final HLayout fields = new HLayout();
-        final HLayout fields2 = new HLayout();
+        this.vegzone.setColSpan(4);
+        this.start = PanelHelper.createIntegerItem("uinfo_vegetation_zones_from", this.MSG.uinfo_vegetation_zones_from(), 50);
+        this.end = PanelHelper.createIntegerItem("uinfo_vegetation_zones_to", this.MSG.uinfo_vegetation_zones_to(), 50);
+        final VLayout fields = new VLayout();
 
         final Button add = new Button(this.MSG.add_date()); // TODO: make key more generic or change to more specific
 
         final DynamicForm form1 = new DynamicForm();
-        final DynamicForm form2 = new DynamicForm();
-        form2.setNumCols(5);
-        form1.setNumCols(7);
-        form1.setFields(this.vegzone);
-        form2.setFields(this.start, this.end);
+        form1.setNumCols(4); // für Layout untereinander muss 2 eingestellt werden
+
+        form1.setFields(this.vegzone, this.start, this.end);
 
         add.addClickHandler(new ClickHandler() {
             @Override
@@ -72,10 +70,7 @@
         });
 
         fields.addMember(form1);
-        fields2.addMember(form2);
-
         root.addMember(fields);
-        root.addMember(fields2);
         root.addMember(PanelHelper.getSpacer(10));
         root.addMember(add);
         root.addMember(PanelHelper.getSpacer(20));

http://dive4elements.wald.intevation.org