changeset 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 8c527ea4603b
files flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/MeasurementStationListGrid.java
diffstat 2 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java	Fri Feb 01 16:32:48 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java	Mon Feb 04 13:44:36 2013 +0100
@@ -8,7 +8,6 @@
 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.DecoratorPanel;
 import com.google.gwt.user.client.ui.Grid;
 import com.smartgwt.client.types.ListGridFieldType;
 import com.smartgwt.client.widgets.Canvas;
@@ -17,6 +16,7 @@
 import com.smartgwt.client.widgets.grid.ListGridField;
 import com.smartgwt.client.widgets.grid.ListGridRecord;
 import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.VLayout;
 
 import de.intevation.flys.client.client.FLYS;
 import de.intevation.flys.client.shared.model.Data;
@@ -164,10 +164,12 @@
         }
     }
 
-    class GaugeInfoPanel extends DecoratorPanel {
+    class GaugeInfoPanel extends VLayout {
 
         public GaugeInfoPanel(GaugeInfo gauge) {
             setStyleName("gaugeinfopanel");
+            setWidth100();
+
             Grid grid = new Grid(4, 2);
 
             NumberFormat nf = NumberFormat.getDecimalFormat();
@@ -201,7 +203,7 @@
                 grid.setText(3, 1, nf.format(datum));
             }
 
-            setWidget(grid);
+            addMember(grid);
         }
     }
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/MeasurementStationListGrid.java	Fri Feb 01 16:32:48 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/MeasurementStationListGrid.java	Mon Feb 04 13:44:36 2013 +0100
@@ -3,7 +3,6 @@
 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.DecoratorPanel;
 import com.google.gwt.user.client.ui.Grid;
 
 import com.smartgwt.client.types.ListGridFieldType;
@@ -11,6 +10,7 @@
 import com.smartgwt.client.widgets.WidgetCanvas;
 import com.smartgwt.client.widgets.grid.ListGridField;
 import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.layout.VLayout;
 
 import de.intevation.flys.client.client.FLYS;
 import de.intevation.flys.client.shared.model.MeasurementStation;
@@ -84,10 +84,12 @@
         this.addData(record);
     }
 
-    class MeasurementStationDecoratorPanel extends DecoratorPanel {
+    class MeasurementStationDecoratorPanel extends VLayout {
 
         public MeasurementStationDecoratorPanel(MeasurementStation station) {
             setStyleName("infopanel");
+            setWidth100();
+
             Grid grid = new Grid(5, 2);
 
             String type = station.getMeasurementType();
@@ -123,7 +125,7 @@
                 grid.setText(4, 1, moperator);
             }
 
-            setWidget(grid);
+            addMember(grid);
         }
     }
 

http://dive4elements.wald.intevation.org