annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java @ 1401:047a44270348

Removed needless imports. flys-client/trunk@3286 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 17 Nov 2011 16:24:09 +0000
parents 748e7c828d03
children ed16f28e9063
rev   line source
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.client.ui.wq;
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import com.google.gwt.core.client.GWT;
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 import com.smartgwt.client.types.ListGridFieldType;
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import com.smartgwt.client.types.SelectionStyle;
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 import com.smartgwt.client.widgets.grid.ListGrid;
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 import com.smartgwt.client.widgets.grid.ListGridField;
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import de.intevation.flys.client.client.FLYSConstants;
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 /**
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 */
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 public class QDTable extends ListGrid {
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 /** The message class that provides i18n strings.*/
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 protected FLYSConstants MESSAGE = GWT.create(FLYSConstants.class);
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
22 protected boolean lockClick;
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
23
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 public QDTable() {
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
25 String baseUrl = GWT.getHostPageBaseURL();
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
26
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 setWidth100();
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 setHeight100();
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 setSelectionType(SelectionStyle.SINGLE);
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 setSelectionType(SelectionStyle.SINGLE);
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 setShowHeaderContextMenu(false);
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 setShowRecordComponents(true);
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 setShowRecordComponentsByCell(true);
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 setEmptyMessage(MESSAGE.empty_table());
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
36 ListGridField addMax = new ListGridField("max", "");
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
37 addMax.setType(ListGridFieldType.ICON);
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
38 addMax.setWidth(30);
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
39 addMax.setCellIcon(baseUrl + MESSAGE.markerRed());
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
40
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
41 ListGridField addMin = new ListGridField("min", "");
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
42 addMin.setType(ListGridFieldType.ICON);
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
43 addMin.setWidth(30);
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
44 addMin.setCellIcon(baseUrl + MESSAGE.markerGreen());
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
45
904
1e08a5b0add9 Changed table header string and set the column width to percental value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 903
diff changeset
46 ListGridField name = new ListGridField("name", MESSAGE.discharge());
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 name.setType(ListGridFieldType.TEXT);
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 name.setWidth("*");
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 ListGridField type = new ListGridField("type", MESSAGE.type());
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 type.setType(ListGridFieldType.TEXT);
904
1e08a5b0add9 Changed table header string and set the column width to percental value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 903
diff changeset
52 type.setWidth("20%");
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54 ListGridField value = new ListGridField("value", MESSAGE.wq_value());
903
dd702348b878 Changed columns to the correct type for most tables.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
55 value.setType(ListGridFieldType.FLOAT);
904
1e08a5b0add9 Changed table header string and set the column width to percental value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 903
diff changeset
56 value.setWidth("20%");
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
58 setFields(addMax, addMin, name, type, value);
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 }
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
60
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
61 public void hideIconFields () {
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
62 hideField("max");
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
63 hideField("min");
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
64 lockClick = true;
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
65 }
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
66
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
67
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
68 public void showIconFields() {
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
69 showField("max");
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
70 showField("min");
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
71 lockClick = false;
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
72 }
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
73
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
74 public boolean isLocked() {
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
75 return lockClick;
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
76 }
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
77
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 }
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org