comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java @ 580:42512fce9b1b

#140, #122: Splitted the WQD table in the WQInputPanel into two tables: a table for QD values and a table for W values - only the QD table is selectable. flys-client/trunk@2164 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 20 Jun 2011 10:32:54 +0000
parents
children 5341be7dec7a
comparison
equal deleted inserted replaced
579:f1b977657880 580:42512fce9b1b
1 package de.intevation.flys.client.client.ui.wq;
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 QDTable extends ListGrid {
18
19 /** The message class that provides i18n strings.*/
20 protected FLYSConstants MESSAGE = 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 QDTable() {
27 setWidth100();
28 setHeight100();
29 setSelectionType(SelectionStyle.SINGLE);
30 setSelectionType(SelectionStyle.SINGLE);
31 setShowHeaderContextMenu(false);
32 setShowRecordComponents(true);
33 setShowRecordComponentsByCell(true);
34 setEmptyMessage(MESSAGE.empty_table());
35
36 ListGridField addMax = new ListGridField("", "");
37 addMax.setType(ListGridFieldType.ICON);
38 addMax.setWidth(30);
39 addMax.setCellIcon(IMAGES.markerRed().getURL());
40
41 ListGridField addMin = new ListGridField("", "");
42 addMin.setType(ListGridFieldType.ICON);
43 addMin.setWidth(30);
44 addMin.setCellIcon(IMAGES.markerGreen().getURL());
45
46 ListGridField name = new ListGridField("name", MESSAGE.name());
47 name.setType(ListGridFieldType.TEXT);
48 name.setWidth("*");
49
50 ListGridField type = new ListGridField("type", MESSAGE.type());
51 type.setType(ListGridFieldType.TEXT);
52 type.setWidth("50");
53
54 ListGridField value = new ListGridField("value", MESSAGE.wq_value());
55 value.setType(ListGridFieldType.TEXT);
56 type.setWidth("50");
57
58 setFields(addMin, addMax, name, type, value);
59 }
60 }
61 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org