annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/wq/QDTable.java @ 7565:84107f13167c

issue1542: Include validity also in qdtable, reorder code, widen column width.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 13 Nov 2013 08:10:00 +0100
parents 3c4c0ea52bbb
children 1244db8cd1d9
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
6 * documentation coming with Dive4Elements River for details.
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.client.ui.wq;
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
10
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 import com.google.gwt.core.client.GWT;
1498
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
12 import com.google.gwt.i18n.client.NumberFormat;
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
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 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
15 import com.smartgwt.client.types.SelectionStyle;
1498
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
16 import com.smartgwt.client.widgets.grid.CellFormatter;
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
17 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
18 import com.smartgwt.client.widgets.grid.ListGridField;
1498
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
19 import com.smartgwt.client.widgets.grid.ListGridRecord;
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
20
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
21 import org.dive4elements.river.client.client.FLYSConstants;
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
22
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
23
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 /**
6666
3c4c0ea52bbb issue1259: in WQAdaptedInputPanel (vollmer w/q-input) allow
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6371
diff changeset
25 * Table showing Q and D main values, allowing for selection, if
3c4c0ea52bbb issue1259: in WQAdaptedInputPanel (vollmer w/q-input) allow
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6371
diff changeset
26 * showSelect is called. In that case, a CellClickHandler should
3c4c0ea52bbb issue1259: in WQAdaptedInputPanel (vollmer w/q-input) allow
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6371
diff changeset
27 * be registered.
3c4c0ea52bbb issue1259: in WQAdaptedInputPanel (vollmer w/q-input) allow
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6371
diff changeset
28 *
3c4c0ea52bbb issue1259: in WQAdaptedInputPanel (vollmer w/q-input) allow
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6371
diff changeset
29 * TODO becomes very similiar to WTable. Probably mergeable.
3c4c0ea52bbb issue1259: in WQAdaptedInputPanel (vollmer w/q-input) allow
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6371
diff changeset
30 *
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
31 * @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
32 */
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 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
34
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 /** 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
36 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
37
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
38
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
39 protected boolean lockClick;
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
40
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
41 public QDTable() {
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
42 String baseUrl = GWT.getHostPageBaseURL();
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
43
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
44 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
45 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
46 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
47 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
48 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
49 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
50 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
51 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
52
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
53 ListGridField addMax = new ListGridField("max", MESSAGE.from());
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
54 addMax.setType(ListGridFieldType.ICON);
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
55 addMax.setWidth(30);
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
56 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
57
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
58 ListGridField addMin = new ListGridField("min", MESSAGE.to());
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
59 addMin.setType(ListGridFieldType.ICON);
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
60 addMin.setWidth(30);
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
61 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
62
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
63 ListGridField select = new ListGridField("select", MESSAGE.selection());
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
64 select.setType(ListGridFieldType.ICON);
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
65 select.setWidth(70);
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
66 select.setCellIcon(baseUrl + MESSAGE.markerGreen());
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
67
904
1e08a5b0add9 Changed table header string and set the column width to percental value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 903
diff changeset
68 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
69 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
70 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
71
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
72 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
73 type.setType(ListGridFieldType.TEXT);
6371
19459037b3c7 GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
74 type.setWidth("10%");
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
75
7565
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
76 ListGridField startTime = new ListGridField("starttime", MESSAGE.starttime());
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
77 startTime.setType(ListGridFieldType.DATE);
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
78 startTime.setWidth("60");
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
79
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
80 ListGridField stopTime = new ListGridField("stoptime", MESSAGE.stoptime());
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
81 stopTime.setType(ListGridFieldType.DATE);
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
82 stopTime.setWidth("60");
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
83
1498
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
84 final NumberFormat nf = NumberFormat.getDecimalFormat();
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
85
2460
5659b5e8c9a8 #204 Modified i18n strings in WQD table.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1498
diff changeset
86 ListGridField value = new ListGridField("value", MESSAGE.wq_value_q());
903
dd702348b878 Changed columns to the correct type for most tables.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
87 value.setType(ListGridFieldType.FLOAT);
1498
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
88 value.setCellFormatter(new CellFormatter() {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
89 @Override
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
90 public String format(Object v, ListGridRecord r, int row, int col) {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
91 if (v == null) {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
92 return null;
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
93 }
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
94
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
95 try {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
96 double value = Double.valueOf(v.toString());
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
97 return nf.format(value);
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
98 }
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
99 catch (NumberFormatException nfe) {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
100 return v.toString();
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
101 }
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
102 }
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
103 });
6371
19459037b3c7 GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
104 value.setWidth("15%");
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
105
6371
19459037b3c7 GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
106 ListGridField official = new ListGridField("official", MESSAGE.official_regulation());
19459037b3c7 GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
107 official.setType(ListGridFieldType.TEXT);
19459037b3c7 GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
108 official.setWidth("25%");
19459037b3c7 GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
109
7565
84107f13167c issue1542: Include validity also in qdtable, reorder code, widen column width.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6666
diff changeset
110 setFields(addMax, addMin, select, name, type, value, official, startTime, stopTime);
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
111 }
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
112
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
113 public void hideIconFields () {
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
114 hideField("max");
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
115 hideField("min");
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
116 hideField("select");
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
117 lockClick = true;
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
118 }
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
119
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
120
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
121 public void showIconFields() {
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
122 showField("max");
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
123 showField("min");
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
124 hideField("select");
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
125 lockClick = false;
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
126 }
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
127
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
128 public void showSelect() {
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
129 showField("select");
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
130 hideField("max");
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
131 hideField("min");
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
132 }
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
133
6666
3c4c0ea52bbb issue1259: in WQAdaptedInputPanel (vollmer w/q-input) allow
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6371
diff changeset
134 /** Whether or not can be clicked on. */
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
135 public boolean isLocked() {
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
136 return lockClick;
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
137 }
5774
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
138
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
139 /**
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
140 * Search all records for one with attribute name equals to given name.
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
141 * @return null if none found.
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
142 * */
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
143 public Double findRecordValue(String name) {
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
144 for (ListGridRecord record : getRecords()) {
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
145 if (record.getAttribute("name").equals(name)) {
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
146 return record.getAttributeAsDouble("value");
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
147 }
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
148 }
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
149 return null;
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
150 }
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
151 }
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
152 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org