diff flys-client/src/main/java/de/intevation/flys/client/client/ui/range/LocationsTable.java @ 781:6653cf54b45d

The distance panel got two tables for locations and ranges. Both do not load any data until now. flys-client/trunk@2271 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 30 Jun 2011 11:59:02 +0000
parents
children dbaef661d0e5
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/range/LocationsTable.java	Thu Jun 30 11:59:02 2011 +0000
@@ -0,0 +1,70 @@
+package de.intevation.flys.client.client.ui.range;
+
+import com.google.gwt.core.client.GWT;
+
+import com.smartgwt.client.types.ListGridFieldType;
+import com.smartgwt.client.types.SelectionStyle;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+
+import de.intevation.flys.client.client.FLYSConstants;
+import de.intevation.flys.client.client.FLYSImages;
+
+
+/**
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class LocationsTable extends ListGrid {
+
+    /** The message class that provides i18n strings.*/
+    protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
+
+    /** The interface that provides the image resources. */
+    private FLYSImages IMAGES = GWT.create(FLYSImages.class);
+
+
+    public LocationsTable() {
+        setWidth100();
+        setHeight100();
+        setSelectionType(SelectionStyle.SINGLE);
+        setSelectionType(SelectionStyle.SINGLE);
+        setShowHeaderContextMenu(false);
+        setShowRecordComponents(true);
+        setShowRecordComponentsByCell(true);
+        setEmptyMessage(MSG.empty_table());
+
+        ListGridField addfrom = new ListGridField ("", "");
+        addfrom.setType(ListGridFieldType.ICON);
+        addfrom.setWidth(20);
+        addfrom.setCellIcon(IMAGES.markerGreen().getURL());
+
+        ListGridField addto = new ListGridField("", "");
+        addto.setType(ListGridFieldType.ICON);
+        addto.setWidth(20);
+        addto.setCellIcon(IMAGES.markerRed().getURL());
+
+        ListGridField ldescr = new ListGridField(
+            "description", MSG.description());
+        ldescr.setType(ListGridFieldType.TEXT);
+        ldescr.setWidth("*");
+
+        ListGridField lside = new ListGridField("riverside", MSG.riverside());
+        lside.setType(ListGridFieldType.TEXT);
+        lside.setWidth(40);
+
+        ListGridField loc = new ListGridField("from", MSG.locations());
+        loc.setType(ListGridFieldType.TEXT);
+        loc.setWidth(40);
+
+        ListGridField bottom = new ListGridField("bottom", MSG.bottom_edge());
+        bottom.setType(ListGridFieldType.TEXT);
+        bottom.setWidth(30);
+
+        ListGridField top = new ListGridField("top", MSG.top_edge());
+        top.setType(ListGridFieldType.TEXT);
+        top.setWidth(30);
+
+        setFields(addfrom, addto, ldescr, loc, lside, bottom, top);
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org