Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/MeasurementStationInfoPanel.java @ 5462:f2371f3aaf03
Show top level folder icons only if node has no factory
If you have an empty folder the folder icon is still shown.
This makes it possible to add functional "Top Level" entries
in the Datacage
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 26 Mar 2013 18:29:13 +0100 |
parents | 6f6461e07854 |
children |
line wrap: on
line source
package de.intevation.flys.client.client.ui.stationinfo; import java.util.Date; import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.DateTimeFormat; import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; import com.google.gwt.user.client.ui.Grid; import com.smartgwt.client.widgets.layout.VLayout; import de.intevation.flys.client.client.FLYSConstants; import de.intevation.flys.client.shared.model.MeasurementStation; public class MeasurementStationInfoPanel extends VLayout { /** The message class that provides i18n strings.*/ private FLYSConstants MSG = GWT.create(FLYSConstants.class); public MeasurementStationInfoPanel(MeasurementStation station) { setStyleName("infopanel"); setWidth100(); Grid grid = new Grid(5, 2); 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(1, 0, MSG.riverside()); grid.setText(1, 1, riverside); } String gaugename = station.getGaugeName(); if (gaugename != null) { grid.setText(2, 0, MSG.measurement_station_gauge_name()); grid.setText(2, 1, gaugename); } DateTimeFormat df = DateTimeFormat.getFormat( PredefinedFormat.DATE_MEDIUM); Date starttime = station.getStartTime(); if (starttime != null) { grid.setText(3, 0, MSG.measurement_station_start_time()); 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); } addMember(grid); } }