Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/range/RangeTable.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 |
comparison
equal
deleted
inserted
replaced
780:a39c2f531755 | 781:6653cf54b45d |
---|---|
1 package de.intevation.flys.client.client.ui.range; | |
2 | |
3 import com.google.gwt.core.client.GWT; | |
4 | |
5 import com.smartgwt.client.types.ListGridFieldType; | |
6 import com.smartgwt.client.types.SelectionStyle; | |
7 import com.smartgwt.client.widgets.grid.ListGrid; | |
8 import com.smartgwt.client.widgets.grid.ListGridField; | |
9 | |
10 import de.intevation.flys.client.client.FLYSConstants; | |
11 import de.intevation.flys.client.client.FLYSImages; | |
12 | |
13 | |
14 /** | |
15 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
16 */ | |
17 public class RangeTable extends ListGrid { | |
18 | |
19 /** The message class that provides i18n strings.*/ | |
20 protected FLYSConstants MESSAGES = GWT.create(FLYSConstants.class); | |
21 | |
22 /** The interface that provides the image resources. */ | |
23 private FLYSImages IMAGES = GWT.create(FLYSImages.class); | |
24 | |
25 | |
26 public RangeTable() { | |
27 setWidth100(); | |
28 setHeight100(); | |
29 setSelectionType(SelectionStyle.SINGLE); | |
30 setSelectionType(SelectionStyle.SINGLE); | |
31 setShowHeaderContextMenu(false); | |
32 setShowRecordComponents(true); | |
33 setShowRecordComponentsByCell(true); | |
34 setEmptyMessage(MESSAGES.empty_table()); | |
35 | |
36 ListGridField addDistance = new ListGridField ("", ""); | |
37 addDistance.setType (ListGridFieldType.ICON); | |
38 addDistance.setWidth (20); | |
39 addDistance.setCellIcon (IMAGES.markerGreen ().getURL ()); | |
40 | |
41 ListGridField ddescr = new ListGridField( | |
42 "description", MESSAGES.description()); | |
43 ddescr.setType(ListGridFieldType.TEXT); | |
44 ddescr.setWidth("*"); | |
45 ListGridField from = new ListGridField("from", MESSAGES.from()); | |
46 from.setType(ListGridFieldType.TEXT); | |
47 from.setWidth(40); | |
48 | |
49 ListGridField to = new ListGridField("to", MESSAGES.to()); | |
50 to.setType(ListGridFieldType.TEXT); | |
51 to.setWidth(40); | |
52 | |
53 ListGridField dside = new ListGridField( | |
54 "riverside", MESSAGES.riverside()); | |
55 dside.setType(ListGridFieldType.TEXT); | |
56 dside.setWidth(40); | |
57 | |
58 ListGridField bottom = new ListGridField( | |
59 "bottom", MESSAGES.bottom_edge()); | |
60 bottom.setType(ListGridFieldType.TEXT); | |
61 bottom.setWidth(30); | |
62 | |
63 ListGridField top = new ListGridField("top", MESSAGES.top_edge()); | |
64 top.setType(ListGridFieldType.TEXT); | |
65 top.setWidth(30); | |
66 | |
67 setFields(addDistance, ddescr, from, to, dside, bottom, top); | |
68 } | |
69 } | |
70 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |