# HG changeset patch # User Raimund Renkert # Date 1361346180 -3600 # Node ID 5ae8b8b46323ed076e55e88390b5fc61d7ad7dbf # Parent d1b50434b2598707d04fb3ada44116a5be140074 Removed last gwt part from gauge info panel. diff -r d1b50434b259 -r 5ae8b8b46323 flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeInfoPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeInfoPanel.java Wed Feb 20 08:45:55 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeInfoPanel.java Wed Feb 20 08:43:00 2013 +0100 @@ -5,7 +5,7 @@ import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.i18n.client.NumberFormat; import com.google.gwt.user.client.ui.Anchor; -import com.google.gwt.user.client.ui.Grid; +import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.Label; @@ -24,43 +24,64 @@ public GaugeInfoPanel(GaugeInfo gauge, FLYS flys) { this.flys = flys; setStyleName("gaugeinfopanel"); - setWidth100(); - - Grid grid = new Grid(5, 2); NumberFormat nf = NumberFormat.getDecimalFormat(); + VLayout grid = new VLayout(); + HLayout line1 = new HLayout(); + Double minw = gauge.getMinW(); Double maxw = gauge.getMaxW(); if (minw != null && maxw != null) { - grid.setText(0, 0, MSG.wq_value_q()); - grid.setText(0, 1, nf.format(minw) + - " - " + nf.format(maxw)); + Label key = new Label(MSG.wq_value_q()); + Label value = new Label(nf.format(minw) + + " - " + nf.format(maxw)); + key.setWidth(150); + line1.addMember(key); + line1.addMember(value); } + HLayout line2 = new HLayout(); Double minq = gauge.getMinQ(); Double maxq = gauge.getMaxQ(); if (minq != null && maxq != null) { - grid.setText(1, 0, MSG.wq_value_w()); - grid.setText(1, 1, nf.format(minq) + + Label key = new Label(MSG.wq_value_w()); + Label value = new Label( nf.format(minq) + " - " + nf.format(maxq)); + key.setWidth(150); + line2.addMember(key); + line2.addMember(value); } + HLayout line3 = new HLayout(); Double aeo = gauge.getAeo(); if (aeo != null) { - grid.setText(2, 0, "AEO [km²]"); - grid.setText(2, 1, nf.format(aeo)); + Label key = new Label("AEO [km²]"); + Label value = new Label(nf.format(aeo)); + key.setWidth(150); + line3.addMember(key); + line3.addMember(value); } + HLayout line4 = new HLayout(); Double datum = gauge.getDatum(); if (datum != null) { - grid.setText(3, 0, MSG.gauge_zero() + " [" + + Label key = new Label(MSG.gauge_zero() + " [" + gauge.getWstUnit() + "]"); - grid.setText(3, 1, nf.format(datum)); + Label value = new Label(nf.format(datum)); + key.setWidth(150); + line4.addMember(key); + line4.addMember(value); } - grid.setWidget(4,0, new GaugeMainValueAnchor(flys, gauge)); + HLayout line5 = new HLayout(); + line5.addMember(new GaugeMainValueAnchor(flys, gauge)); + grid.addMember(line1); + grid.addMember(line2); + grid.addMember(line3); + grid.addMember(line4); + grid.addMember(line5); addMember(grid); }