[PATCH] (issue869) Add spacer for multiline items

Wald Commits scm-commit at wald.intevation.org
Tue Mar 24 15:22:24 CET 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427206936 -3600
# Node ID b5854a9b101c6e2cc26fa8259331562361d09966
# Parent  e331a5ad2554d6958b223e257960d373074f0a09
(issue869) Add spacer for multiline items

    This works because single line values now have a height
    of 15 + spacer (which amounts to the 20 it was before).

    Multiline columns can have any height as this is generated
    automatically on breaks to show all text. We now add +5 there
    so that they have at least some space.

diff -r e331a5ad2554 -r b5854a9b101c gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterMatrixPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterMatrixPanel.java	Tue Mar 24 11:57:23 2015 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterMatrixPanel.java	Tue Mar 24 15:22:16 2015 +0100
@@ -15,6 +15,7 @@
 import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.layout.HLayout;
 import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.layout.LayoutSpacer;
 
 import org.dive4elements.river.client.client.FLYSConstants;
 import org.dive4elements.river.client.shared.model.Data;
@@ -132,9 +133,12 @@
 
                 value.setValign(com.smartgwt.client.types.VerticalAlignment.TOP);
                 value.setWidth(130);
-                value.setHeight(20);
+                value.setHeight(15);
 
                 cols.addMember(value);
+                LayoutSpacer spacer = new LayoutSpacer();
+                spacer.setHeight(5);
+                cols.addMember(spacer);
             }
 
             row.addMember(parameter);


More information about the Dive4Elements-commits mailing list