[PATCH] Label for Eingabhilfe bundu.bezugswasserstände.EingabeFürWQDaten

Wald Commits scm-commit at wald.intevation.org
Wed Aug 15 16:26:30 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1534343182 -7200
# Node ID 43c975f8ab92f4330fc3e2e5530086620fe0bbc6
# Parent  55e3b1a8aa0679ccf53b0cb0789eb27910262ca6
Label for Eingabhilfe bundu.bezugswasserstände.EingabeFürWQDaten

diff -r 55e3b1a8aa06 -r 43c975f8ab92 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Wed Aug 15 15:10:01 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Wed Aug 15 16:26:22 2018 +0200
@@ -1611,4 +1611,6 @@
 
     String name_of_sounding();
 
+    String bundu_ws_wq_info();
+
 }
\ No newline at end of file
diff -r 55e3b1a8aa06 -r 43c975f8ab92 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Wed Aug 15 15:10:01 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Wed Aug 15 16:26:22 2018 +0200
@@ -858,6 +858,7 @@
 bundu_bezugswst_mode_ud = UD am Pegel [d/a] 
 bundu_bezugswst_validation_range = Die Eingabe muss eine Ganzzahl zwischen 0 und 364 sein.
 bundu_wst_export = Bezugswasserst\u00e4nde Export
+bundu_ws_wq_info = Die Abfl\u00fcsse MNQ, MQ und MHQ sind anhand der Tagesmittelwerte des Abflusses berechnet.
 
 chart_settings_export_metadata = Show Meta-Data
 export_csv_title = Title: 
diff -r 55e3b1a8aa06 -r 43c975f8ab92 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Wed Aug 15 15:10:01 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Wed Aug 15 16:26:22 2018 +0200
@@ -858,6 +858,7 @@
 bundu_bezugswst_mode_ud = UD am Pegel [d/a] 
 bundu_bezugswst_validation_range = Die Eingabe muss eine Ganzzahl zwischen 0 und 364 sein.
 bundu_wst_export = Bezugswasserst\u00e4nde Export
+bundu_ws_wq_info = Die Abfl\u00fcsse MNQ, MQ und MHQ sind anhand der Tagesmittelwerte des Abflusses berechnet.
 
 chart_settings_export_metadata = Metadaten anzeigen
 export_csv_title = Titel: 
diff -r 55e3b1a8aa06 -r 43c975f8ab92 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/AbstractWQAdaptedInputPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/AbstractWQAdaptedInputPanel.java	Wed Aug 15 15:10:01 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/AbstractWQAdaptedInputPanel.java	Wed Aug 15 16:26:22 2018 +0200
@@ -28,10 +28,11 @@
 import org.dive4elements.river.client.shared.model.WQInfoRecord;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Style.Unit;
+import com.google.gwt.user.client.ui.Label;
 import com.smartgwt.client.data.Record;
 import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.form.DynamicForm;
 import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
 import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
@@ -107,14 +108,25 @@
     /** Inits the helper panel. */
     // TODO duplicate in WQInputPanel
     protected void initHelperPanel() {
+        final VLayout layout = new VLayout();
         this.tabs = new TabSet();
         this.tabs.setWidth100();
         this.tabs.setHeight100();
+        final String msg = this.getWQInfoMsg();
+        final Label test = PanelHelper.getValidationLabel();
+        test.setText(msg);
+        test.getElement().getStyle().setColor("red");
+        test.getElement().getStyle().setPadding(1, Unit.MM);
 
         // For each gauge, add two tabs with helper tables.
         createTabs();
+        layout.addMember(this.tabs);
+        if (msg != null)
+            layout.addMember(test);
 
-        this.helperContainer.addMember(this.tabs);
+        this.helperContainer.addMember(layout);
+        // DOM.setStyleAttribute(test.getElement(), "color", "red");
+
     }
 
     /** Create labels, canvasses, layouts. */
@@ -129,7 +141,7 @@
         final Canvas widget = createWidget(data);
         final Label label = new Label(this.MSG.wqadaptedTitle());
 
-        label.setHeight(25);
+        label.setHeight("25px");
 
         final VLayout layout = new VLayout();
         layout.setMembersMargin(10);
@@ -302,8 +314,8 @@
 
                 final Label v = new Label(sb.toString());
 
-                l.setWidth(65);
-                v.setWidth(65);
+                l.setWidth("65px");
+                v.setWidth("65px");
 
                 h.addMember(l);
                 h.addMember(v);
@@ -503,5 +515,7 @@
         return adesc.getRiver();
     }
 
-    abstract protected Canvas createWidget(final DataList dataList);
+    protected abstract Canvas createWidget(final DataList dataList);
+
+    protected abstract String getWQInfoMsg();
 }
\ No newline at end of file
diff -r 55e3b1a8aa06 -r 43c975f8ab92 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQAdaptedInputPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQAdaptedInputPanel.java	Wed Aug 15 15:10:01 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQAdaptedInputPanel.java	Wed Aug 15 16:26:22 2018 +0200
@@ -441,4 +441,9 @@
         }
 
     }
+
+    @Override
+    protected String getWQInfoMsg() {
+        return null;
+    }
 }
\ No newline at end of file
diff -r 55e3b1a8aa06 -r 43c975f8ab92 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java	Wed Aug 15 15:10:01 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java	Wed Aug 15 16:26:22 2018 +0200
@@ -211,6 +211,7 @@
     protected void createTabs() {
         for (int i = 0; i < this.gaugeRanges.size(); i++) {
             final Tab qTab = new Tab(this.MSG.wq_table_q());
+            qTab.setPaneMargin(0);
             final QDTable qdTable = new QDTable();
             this.qdTables.add(qdTable);
             qdTable.showSelect();
@@ -218,6 +219,7 @@
             this.tabs.addTab(qTab, i);
         }
         this.tabs.setSelectedTab(0);
+
     }
 
     private Canvas createList(final DataList dataList) {
@@ -449,4 +451,9 @@
 
     }
 
+    @Override
+    protected String getWQInfoMsg() {
+        return this.MSG.bundu_ws_wq_info();
+    }
+
 }
\ No newline at end of file


More information about the Dive4Elements-commits mailing list