Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java @ 4957:5652aa0ad9e5
Use VLayout instead of GWTs DecoratorPanel
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 04 Feb 2013 13:44:36 +0100 |
parents | f46a07c11324 |
children | 2b7886ba7bb2 |
comparison
equal
deleted
inserted
replaced
4956:f46a07c11324 | 4957:5652aa0ad9e5 |
---|---|
6 import com.google.gwt.core.client.GWT; | 6 import com.google.gwt.core.client.GWT; |
7 import com.google.gwt.event.dom.client.ClickEvent; | 7 import com.google.gwt.event.dom.client.ClickEvent; |
8 import com.google.gwt.event.dom.client.ClickHandler; | 8 import com.google.gwt.event.dom.client.ClickHandler; |
9 import com.google.gwt.i18n.client.NumberFormat; | 9 import com.google.gwt.i18n.client.NumberFormat; |
10 import com.google.gwt.user.client.ui.Anchor; | 10 import com.google.gwt.user.client.ui.Anchor; |
11 import com.google.gwt.user.client.ui.DecoratorPanel; | |
12 import com.google.gwt.user.client.ui.Grid; | 11 import com.google.gwt.user.client.ui.Grid; |
13 import com.smartgwt.client.types.ListGridFieldType; | 12 import com.smartgwt.client.types.ListGridFieldType; |
14 import com.smartgwt.client.widgets.Canvas; | 13 import com.smartgwt.client.widgets.Canvas; |
15 import com.smartgwt.client.widgets.Label; | 14 import com.smartgwt.client.widgets.Label; |
16 import com.smartgwt.client.widgets.WidgetCanvas; | 15 import com.smartgwt.client.widgets.WidgetCanvas; |
17 import com.smartgwt.client.widgets.grid.ListGridField; | 16 import com.smartgwt.client.widgets.grid.ListGridField; |
18 import com.smartgwt.client.widgets.grid.ListGridRecord; | 17 import com.smartgwt.client.widgets.grid.ListGridRecord; |
19 import com.smartgwt.client.widgets.layout.HLayout; | 18 import com.smartgwt.client.widgets.layout.HLayout; |
19 import com.smartgwt.client.widgets.layout.VLayout; | |
20 | 20 |
21 import de.intevation.flys.client.client.FLYS; | 21 import de.intevation.flys.client.client.FLYS; |
22 import de.intevation.flys.client.shared.model.Data; | 22 import de.intevation.flys.client.shared.model.Data; |
23 import de.intevation.flys.client.shared.model.DataItem; | 23 import de.intevation.flys.client.shared.model.DataItem; |
24 import de.intevation.flys.client.shared.model.DataList; | 24 import de.intevation.flys.client.shared.model.DataList; |
162 flys.newGaugeDischargeCurve(gauge.getRiverName(), | 162 flys.newGaugeDischargeCurve(gauge.getRiverName(), |
163 gauge.getOfficialNumber()); | 163 gauge.getOfficialNumber()); |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
167 class GaugeInfoPanel extends DecoratorPanel { | 167 class GaugeInfoPanel extends VLayout { |
168 | 168 |
169 public GaugeInfoPanel(GaugeInfo gauge) { | 169 public GaugeInfoPanel(GaugeInfo gauge) { |
170 setStyleName("gaugeinfopanel"); | 170 setStyleName("gaugeinfopanel"); |
171 setWidth100(); | |
172 | |
171 Grid grid = new Grid(4, 2); | 173 Grid grid = new Grid(4, 2); |
172 | 174 |
173 NumberFormat nf = NumberFormat.getDecimalFormat(); | 175 NumberFormat nf = NumberFormat.getDecimalFormat(); |
174 | 176 |
175 Double minw = gauge.getMinW(); | 177 Double minw = gauge.getMinW(); |
199 grid.setText(3, 0, MSG.gauge_zero() + " [" + | 201 grid.setText(3, 0, MSG.gauge_zero() + " [" + |
200 gauge.getWstUnit() + "]"); | 202 gauge.getWstUnit() + "]"); |
201 grid.setText(3, 1, nf.format(datum)); | 203 grid.setText(3, 1, nf.format(datum)); |
202 } | 204 } |
203 | 205 |
204 setWidget(grid); | 206 addMember(grid); |
205 } | 207 } |
206 } | 208 } |
207 | 209 |
208 public void open() { | 210 public void open() { |
209 ArrayList<Double> locations = new ArrayList<Double>(); | 211 ArrayList<Double> locations = new ArrayList<Double>(); |