[Dive4elements-commits] [PATCH 4 of 4] Display observation start time in measurement station tree

Wald Commits scm-commit at wald.intevation.org
Mon Oct 29 10:05:13 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351501496 -3600
# Node ID 6aa8cd8da22443c9c2d9e47cc42194ff0585096f
# Parent  3fffd7d5d67d9a14b44e20baac264f075b08e896
Display observation start time in measurement station tree

diff -r 3fffd7d5d67d -r 6aa8cd8da224 flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Mon Oct 29 10:00:17 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Mon Oct 29 10:04:56 2012 +0100
@@ -1070,6 +1070,8 @@
 
     String measurement_station_operator();
 
+    String measurement_station_start_time();
+
     String discharge_timeranges();
 
     String discharge_chart();
diff -r 3fffd7d5d67d -r 6aa8cd8da224 flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Mon Oct 29 10:00:17 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Mon Oct 29 10:04:56 2012 +0100
@@ -558,3 +558,4 @@
 
 measurement_station_type = Type of Measurement Station
 measurement_station_operator = Operator
+measurement_station_start_time = Observation Start Time
diff -r 3fffd7d5d67d -r 6aa8cd8da224 flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Mon Oct 29 10:00:17 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Mon Oct 29 10:04:56 2012 +0100
@@ -556,3 +556,4 @@
 
 measurement_station_type = Typ der Messstelle
 measurement_station_operator = Operator
+measurement_station_start_time = Beobachtungsstart
diff -r 3fffd7d5d67d -r 6aa8cd8da224 flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Mon Oct 29 10:00:17 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Mon Oct 29 10:04:56 2012 +0100
@@ -557,3 +557,4 @@
 
 measurement_station_type = Type of Measurement Station
 measurement_station_operator = Operator
+measurement_station_start_time = Observation Start Time
diff -r 3fffd7d5d67d -r 6aa8cd8da224 flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationTree.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationTree.java	Mon Oct 29 10:00:17 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationTree.java	Mon Oct 29 10:04:56 2012 +0100
@@ -1,8 +1,11 @@
 package de.intevation.flys.client.client.ui;
 
+import java.util.Date;
+
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.i18n.client.DateTimeFormat;
 import com.google.gwt.i18n.client.NumberFormat;
 import com.google.gwt.user.client.ui.Anchor;
 import com.google.gwt.user.client.ui.DecoratorPanel;
@@ -195,6 +198,14 @@
                 grid.setText(2, 1, moperator);
             }
 
+            DateTimeFormat df = DateTimeFormat.getMediumDateFormat();
+
+            Date starttime = station.getStartTime();
+            if (starttime != null) {
+               grid.setText(3, 0, MSG.measurement_station_start_time());
+               grid.setText(3, 1, df.format(starttime));
+            }
+
             setWidget(grid);
         }
     }


More information about the Dive4elements-commits mailing list