[PATCH] validationLabelHeight

Wald Commits scm-commit at wald.intevation.org
Tue Jul 31 15:48:46 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1533044915 -7200
# Node ID d8997670047473797f3e84cf4ad534bd59966992
# Parent  a8d1784ad8e87c07d670c015950d494f9f012831
validationLabelHeight

diff -r a8d1784ad8e8 -r d89976700474 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PanelHelper.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PanelHelper.java	Tue Jul 31 13:59:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PanelHelper.java	Tue Jul 31 15:48:35 2018 +0200
@@ -9,6 +9,7 @@
  */
 package org.dive4elements.river.client.client.ui;
 
+import com.google.gwt.user.client.ui.Label;
 import com.smartgwt.client.types.Alignment;
 import com.smartgwt.client.types.ListGridFieldType;
 import com.smartgwt.client.widgets.form.fields.IntegerItem;
@@ -115,4 +116,11 @@
         return intField;
     }
 
+    public static final Label getValidationLabel() {
+        final Label label = new Label();
+        label.setHeight("15px");
+        label.getElement().getStyle().setColor("red");
+        return label;
+    }
+
 }
diff -r a8d1784ad8e8 -r d89976700474 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java	Tue Jul 31 13:59:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java	Tue Jul 31 15:48:35 2018 +0200
@@ -52,7 +52,7 @@
 
     private static final String datakey = "vegzones";
     final protected List<ListGridRecord> records = new ArrayList<ListGridRecord>();
-    private final Label validationLabel = new Label();
+    private final Label validationLabel = PanelHelper.getValidationLabel();
     private final ListGrid elements = new ListGrid() {
 
         @Override
@@ -202,8 +202,6 @@
         }
 
         this.elements.sort("from", SortDirection.ASCENDING);
-        this.validationLabel.setHeight("10px");
-        this.validationLabel.getElement().getStyle().setColor("red");
         addDataInit(data);
         root.setWidth(width);
         root.addMember(title);
diff -r a8d1784ad8e8 -r d89976700474 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java	Tue Jul 31 13:59:25 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java	Tue Jul 31 15:48:35 2018 +0200
@@ -53,7 +53,7 @@
     // private String tableData = "";
     private ListGrid table;
     private final String datakey = "supraregional_table";
-    final Label validationLabel = new Label();
+    private final Label validationLabel = PanelHelper.getValidationLabel();
 
     private final NumberFormat format = NumberFormat.getDecimalFormat();
 
@@ -248,8 +248,6 @@
 
         final Label title = new Label(data.get(0).getDescription());
         title.setHeight("35px");
-        this.validationLabel.setHeight("10px");
-        this.validationLabel.getElement().getStyle().setColor("red");
         final ListGrid elements = new ListGrid();
         elements.setWidth(320);
         elements.setHeight(300);


More information about the Dive4Elements-commits mailing list