Mercurial > dive4elements > river
changeset 9407:43c975f8ab92
Label for Eingabhilfe bundu.bezugswasserstände.EingabeFürWQDaten
author | gernotbelger |
---|---|
date | Wed, 15 Aug 2018 16:26:22 +0200 |
parents | 55e3b1a8aa06 |
children | 66a43d9f65c8 |
files | gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties gwt-client/src/main/java/org/dive4elements/river/client/client/ui/AbstractWQAdaptedInputPanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/WQAdaptedInputPanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java |
diffstat | 6 files changed, 36 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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:
--- 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:
--- 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
--- 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
--- 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