annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/range/LocationsTable.java @ 886:2161d3acc83f

Changed field size from fixed to percental value in helper tables. flys-client/trunk@2720 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 13 Sep 2011 12:47:54 +0000
parents dbaef661d0e5
children dd702348b878
rev   line source
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.client.ui.range;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import com.google.gwt.core.client.GWT;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 import com.smartgwt.client.types.ListGridFieldType;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import com.smartgwt.client.types.SelectionStyle;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 import com.smartgwt.client.widgets.grid.ListGrid;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 import com.smartgwt.client.widgets.grid.ListGridField;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import de.intevation.flys.client.client.FLYSConstants;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import de.intevation.flys.client.client.FLYSImages;
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 /**
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 */
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 public class LocationsTable extends ListGrid {
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 /** The message class that provides i18n strings.*/
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 /** The interface that provides the image resources. */
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 private FLYSImages IMAGES = GWT.create(FLYSImages.class);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 public LocationsTable() {
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 setWidth100();
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 setHeight100();
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 setSelectionType(SelectionStyle.SINGLE);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 setSelectionType(SelectionStyle.SINGLE);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 setShowHeaderContextMenu(false);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 setShowRecordComponents(true);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 setShowRecordComponentsByCell(true);
876
dbaef661d0e5 Changed i18n string for empty table and set header fields to fixed order.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 781
diff changeset
34 setEmptyMessage(MSG.empty_filter());
dbaef661d0e5 Changed i18n string for empty table and set header fields to fixed order.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 781
diff changeset
35 setCanReorderFields(false);
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 ListGridField addfrom = new ListGridField ("", "");
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 addfrom.setType(ListGridFieldType.ICON);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 addfrom.setWidth(20);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 addfrom.setCellIcon(IMAGES.markerGreen().getURL());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 ListGridField addto = new ListGridField("", "");
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 addto.setType(ListGridFieldType.ICON);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 addto.setWidth(20);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 addto.setCellIcon(IMAGES.markerRed().getURL());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 ListGridField ldescr = new ListGridField(
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 "description", MSG.description());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 ldescr.setType(ListGridFieldType.TEXT);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 ldescr.setWidth("*");
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 ListGridField lside = new ListGridField("riverside", MSG.riverside());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 lside.setType(ListGridFieldType.TEXT);
886
2161d3acc83f Changed field size from fixed to percental value in helper tables.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 876
diff changeset
54 lside.setWidth("12%");
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 ListGridField loc = new ListGridField("from", MSG.locations());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 loc.setType(ListGridFieldType.TEXT);
886
2161d3acc83f Changed field size from fixed to percental value in helper tables.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 876
diff changeset
58 loc.setWidth("12%");
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 ListGridField bottom = new ListGridField("bottom", MSG.bottom_edge());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 bottom.setType(ListGridFieldType.TEXT);
886
2161d3acc83f Changed field size from fixed to percental value in helper tables.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 876
diff changeset
62 bottom.setWidth("10%");
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 ListGridField top = new ListGridField("top", MSG.top_edge());
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 top.setType(ListGridFieldType.TEXT);
886
2161d3acc83f Changed field size from fixed to percental value in helper tables.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 876
diff changeset
66 top.setWidth("10%");
781
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 setFields(addfrom, addto, ldescr, loc, lside, bottom, top);
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 }
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 }
6653cf54b45d The distance panel got two tables for locations and ranges. Both do not load any data until now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org