changeset 9414:096f151a0a9f

bundu bezugswst länge der abflusszeitreihe fix + klasse vergessen
author gernotbelger
date Thu, 16 Aug 2018 15:47:10 +0200
parents b534a4f4e4f6
children 9744ce3c3853
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/bundu/BunduWstWQPanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/QSeriesLengthPanel.java gwt-client/src/main/java/org/dive4elements/river/client/shared/model/GaugeInfoObject.java
diffstat 6 files changed, 62 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Thu Aug 16 15:47:10 2018 +0200
@@ -1613,4 +1613,5 @@
 
     String bundu_ws_wq_info();
 
+    String error_invalid_integer_positive_required();
 }
\ No newline at end of file
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Thu Aug 16 15:47:10 2018 +0200
@@ -328,6 +328,7 @@
 ele_window_save_error = Error while saving elevations.
 ele_window_geometry_error = The geometry is not supported:
 
+error_invalid_integer_positive_required = Nur Ganzzahlen gr\u00f6\u00dfer 0 erlaubt.
 error_invalid_integer = Nur Ganzzahlen erlaubt.
 error_invalid_double = Nur Zahlen erlaubt.
 error_limit_exceeded_salix = Die Eingabe ist auf 5 Werte beschr\u00e4nkt.
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Thu Aug 16 15:47:10 2018 +0200
@@ -328,6 +328,7 @@
 ele_window_save_error = Fehler beim Speichern der H\u00f6hen.
 ele_window_geometry_error = Die Geometrie wird nicht unterst\u00fctzt:
 
+error_invalid_integer_positive_required = Nur Ganzzahlen gr\u00f6\u00dfer 0 erlaubt.
 error_invalid_integer = Nur Ganzzahlen erlaubt.
 error_invalid_double = Nur Zahlen erlaubt.
 error_limit_exceeded_salix = Die Eingabe ist auf 5 Werte beschr\u00e4nkt.
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java	Thu Aug 16 15:47:10 2018 +0200
@@ -388,7 +388,7 @@
             final DataList[] data = adescr.getOldData();
 
             final String river = getRiverName(data);
-            final int startYear = this.bezugsjahr - this.qSeriesLength;
+            final int startYear = this.bezugsjahr - this.qSeriesLength + 1;
             final int endYear = this.bezugsjahr;
 
             // Gauge ranges overlap, move start and end a bit closer
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/QSeriesLengthPanel.java	Thu Aug 16 12:04:46 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/QSeriesLengthPanel.java	Thu Aug 16 15:47:10 2018 +0200
@@ -131,7 +131,10 @@
         final List<String> errors = new ArrayList<String>();
         errors.addAll(ValidationHelper.checkForEmpty(this.inputItem, this.MSG));
         try {
-            Integer.valueOf(this.inputItem.getValueAsString());
+            final int value = Integer.valueOf(this.inputItem.getValueAsString());
+            if (value <= 0) {
+                errors.add(this.MSG.error_invalid_integer_positive_required());
+            }
         }
         catch (final NumberFormatException e) {
             errors.add(this.MSG.error_invalid_integer());
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/GaugeInfoObject.java	Thu Aug 16 15:47:10 2018 +0200
@@ -0,0 +1,54 @@
+/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by
+ *  Björnsen Beratende Ingenieure GmbH
+ *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+package org.dive4elements.river.client.shared.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author Domenico Nardi Tironi
+ *
+ */
+public class GaugeInfoObject implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String name;
+    private String errorMsg;
+    private Date startdate;
+    private Date enddate; // no final, because Serializable demands for empty constructor and I don't want to set default values
+
+    public GaugeInfoObject() {
+
+    }
+
+    public GaugeInfoObject(final String name, final String errorMsg, final Date startdate, final Date enddate) {
+        this.name = name;
+        this.errorMsg = errorMsg;
+        this.startdate = startdate;
+        this.enddate = enddate;
+    }
+
+    public Date getStartdate() {
+        return this.startdate;
+    }
+
+    public Date getEnddate() {
+        return this.enddate;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public String getErrorMsg() {
+        return this.errorMsg;
+    }
+}

http://dive4elements.wald.intevation.org