[Dive4elements-commits] [PATCH 4 of 5] Reorder elements in the MeasurementStation details

Wald Commits scm-commit at wald.intevation.org
Tue Oct 30 13:05:43 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351598674 -3600
# Node ID 7b701d9dca9865d178d3bdaf858336e2c7a9de35
# Parent  87362ba26c7245df253b6639a10e9008f1f36736
Reorder elements in the MeasurementStation details

Also add the gauge name to the info.

diff -r 87362ba26c72 -r 7b701d9dca98 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	Tue Oct 30 13:03:20 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationTree.java	Tue Oct 30 13:04:34 2012 +0100
@@ -177,26 +177,26 @@
 
         public MeasurementStationDecoratorPanel(MeasurementStation station) {
             setStyleName("infopanel");
-            Grid grid = new Grid(4, 2);
+            Grid grid = new Grid(5, 2);
 
             NumberFormat nf = NumberFormat.getDecimalFormat();
 
+            String type = station.getMeasurementType();
+            if (type != null) {
+                grid.setText(0, 0, MSG.measurement_station_type());
+                grid.setText(0, 1, type);
+            }
+
             String riverside = station.getRiverSide();
             if (riverside != null) {
-                grid.setText(0, 0, MSG.riverside());
-                grid.setText(0, 1, riverside);
+                grid.setText(1, 0, MSG.riverside());
+                grid.setText(1, 1, riverside);
             }
 
-            String type = station.getMeasurementType();
-            if (type != null) {
-                grid.setText(1, 0, MSG.measurement_station_type());
-                grid.setText(1, 1, type);
-            }
-
-            String moperator = station.getOperator();
-            if (moperator != null) {
-                grid.setText(2, 0, MSG.measurement_station_operator());
-                grid.setText(2, 1, moperator);
+            String gaugename = station.getGaugeName();
+            if (gaugename != null) {
+               grid.setText(2, 0, MSG.measurement_station_gauge_name());
+               grid.setText(2, 1, gaugename);
             }
 
             DateTimeFormat df = DateTimeFormat.getMediumDateFormat();
@@ -207,6 +207,12 @@
                grid.setText(3, 1, df.format(starttime));
             }
 
+            String moperator = station.getOperator();
+            if (moperator != null) {
+                grid.setText(4, 0, MSG.measurement_station_operator());
+                grid.setText(4, 1, moperator);
+            }
+
             setWidget(grid);
         }
     }


More information about the Dive4elements-commits mailing list