changeset 3831:dc505433173f

Use the wstunit from the river as unit for the Pegelnullpunkt flys-client/trunk@5526 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Wed, 19 Sep 2012 13:18:36 +0000
parents 60911c8422b7
children 7d58d90d6b96
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java
diffstat 5 files changed, 28 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Sep 19 13:16:24 2012 +0000
+++ b/flys-client/ChangeLog	Wed Sep 19 13:18:36 2012 +0000
@@ -1,3 +1,11 @@
+2012-09-19	Björn Ricks	<bjoern.ricks@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java,
+	  src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java,
+	  src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java,
+	  src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java:
+	  Use the wstunit from the river as unit for the Pegelnullpunkt.
+
 2012-09-19	Björn Ricks	<bjoern.ricks@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/ParameterList.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java	Wed Sep 19 13:16:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java	Wed Sep 19 13:18:36 2012 +0000
@@ -350,7 +350,8 @@
 
             Double datum = gauge.getDatum();
             if (datum != null) {
-                grid.setText(3, 0, MSG.gauge_zero() + " [NN+m]");
+                grid.setText(3, 0, MSG.gauge_zero() + " [" +
+                        gauge.getWstUnit() + "]");
                 grid.setText(3, 1, "" + nf.format(datum));
             }
 
--- a/flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java	Wed Sep 19 13:16:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java	Wed Sep 19 13:18:36 2012 +0000
@@ -139,7 +139,8 @@
                             parseDouble(gminq),
                             parseDouble(gmaxq),
                             parseDouble(gminw),
-                            parseDouble(gmaxw)
+                            parseDouble(gmaxw),
+                            rwstunit
                             );
 
                     gauges.add(gaugeinfo);
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java	Wed Sep 19 13:16:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/DefaultGaugeInfo.java	Wed Sep 19 13:18:36 2012 +0000
@@ -16,6 +16,7 @@
     private Double maxw;
     private boolean kmup;
     private Double station;
+    private String wstunit;
 
     public DefaultGaugeInfo() {
     }
@@ -31,7 +32,8 @@
             Double minq,
             Double maxq,
             Double minw,
-            Double maxw)
+            Double maxw,
+            String wstunit)
     {
         this.name    = name;
         this.station = station;
@@ -43,6 +45,7 @@
         this.maxq    = maxq;
         this.minw    = minw;
         this.maxw    = maxw;
+        this.wstunit = wstunit;
     }
     /**
      * Returns the name of the gauge
@@ -117,4 +120,11 @@
     public Double getStation() {
         return this.station;
     }
+
+    /**
+     * Returns the wst unit as a String
+     */
+    public String getWstUnit() {
+        return this.wstunit;
+    }
 }
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java	Wed Sep 19 13:16:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/GaugeInfo.java	Wed Sep 19 13:18:36 2012 +0000
@@ -58,4 +58,9 @@
      * Returns the station km of the gauge or null if not available
      */
     Double getStation();
+
+    /**
+     * Returns the wst unit as a String
+     */
+    String getWstUnit();
 }

http://dive4elements.wald.intevation.org