Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/MeasurementStationTree.java @ 4327:7b701d9dca98
Reorder elements in the MeasurementStation details
Also add the gauge name to the info.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 30 Oct 2012 13:04:34 +0100 |
parents | 6589f1c95101 |
children | 651b93c10dc5 |
comparison
equal
deleted
inserted
replaced
4326:87362ba26c72 | 4327:7b701d9dca98 |
---|---|
175 | 175 |
176 class MeasurementStationDecoratorPanel extends DecoratorPanel { | 176 class MeasurementStationDecoratorPanel extends DecoratorPanel { |
177 | 177 |
178 public MeasurementStationDecoratorPanel(MeasurementStation station) { | 178 public MeasurementStationDecoratorPanel(MeasurementStation station) { |
179 setStyleName("infopanel"); | 179 setStyleName("infopanel"); |
180 Grid grid = new Grid(4, 2); | 180 Grid grid = new Grid(5, 2); |
181 | 181 |
182 NumberFormat nf = NumberFormat.getDecimalFormat(); | 182 NumberFormat nf = NumberFormat.getDecimalFormat(); |
183 | |
184 String type = station.getMeasurementType(); | |
185 if (type != null) { | |
186 grid.setText(0, 0, MSG.measurement_station_type()); | |
187 grid.setText(0, 1, type); | |
188 } | |
183 | 189 |
184 String riverside = station.getRiverSide(); | 190 String riverside = station.getRiverSide(); |
185 if (riverside != null) { | 191 if (riverside != null) { |
186 grid.setText(0, 0, MSG.riverside()); | 192 grid.setText(1, 0, MSG.riverside()); |
187 grid.setText(0, 1, riverside); | 193 grid.setText(1, 1, riverside); |
188 } | 194 } |
189 | 195 |
190 String type = station.getMeasurementType(); | 196 String gaugename = station.getGaugeName(); |
191 if (type != null) { | 197 if (gaugename != null) { |
192 grid.setText(1, 0, MSG.measurement_station_type()); | 198 grid.setText(2, 0, MSG.measurement_station_gauge_name()); |
193 grid.setText(1, 1, type); | 199 grid.setText(2, 1, gaugename); |
194 } | |
195 | |
196 String moperator = station.getOperator(); | |
197 if (moperator != null) { | |
198 grid.setText(2, 0, MSG.measurement_station_operator()); | |
199 grid.setText(2, 1, moperator); | |
200 } | 200 } |
201 | 201 |
202 DateTimeFormat df = DateTimeFormat.getMediumDateFormat(); | 202 DateTimeFormat df = DateTimeFormat.getMediumDateFormat(); |
203 | 203 |
204 Date starttime = station.getStartTime(); | 204 Date starttime = station.getStartTime(); |
205 if (starttime != null) { | 205 if (starttime != null) { |
206 grid.setText(3, 0, MSG.measurement_station_start_time()); | 206 grid.setText(3, 0, MSG.measurement_station_start_time()); |
207 grid.setText(3, 1, df.format(starttime)); | 207 grid.setText(3, 1, df.format(starttime)); |
208 } | 208 } |
209 | 209 |
210 String moperator = station.getOperator(); | |
211 if (moperator != null) { | |
212 grid.setText(4, 0, MSG.measurement_station_operator()); | |
213 grid.setText(4, 1, moperator); | |
214 } | |
215 | |
210 setWidget(grid); | 216 setWidget(grid); |
211 } | 217 } |
212 } | 218 } |
213 | 219 |
214 @Override | 220 @Override |