annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/wq/QDTable.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-client/src/main/java/org/dive4elements/river/client/client/ui/wq/QDTable.java@821a02bbfb4e
children 172338b1407f
rev   line source
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
1 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
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;
1498
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
4 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
5
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.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
7 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
8 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
9 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
10 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
11 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
12
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
13 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
14
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 /**
4986
3b9f6765d9dc QDTable: Doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3543
diff changeset
17 * Table showing Q and D main values, allowing for selection.
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
18 * @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
19 */
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 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
21
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 /** 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
23 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
24
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
25
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
26 protected boolean lockClick;
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
27
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
28 public QDTable() {
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
29 String baseUrl = GWT.getHostPageBaseURL();
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
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 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
32 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
33 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
34 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
35 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
36 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
37 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
38 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
39
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
40 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
41 addMax.setType(ListGridFieldType.ICON);
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
42 addMax.setWidth(30);
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
43 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
44
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
45 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
46 addMin.setType(ListGridFieldType.ICON);
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
47 addMin.setWidth(30);
1399
748e7c828d03 Issue312.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1369
diff changeset
48 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
49
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
50 ListGridField select = new ListGridField("select", MESSAGE.selection());
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
51 select.setType(ListGridFieldType.ICON);
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
52 select.setWidth(70);
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
53 select.setCellIcon(baseUrl + MESSAGE.markerGreen());
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
54
904
1e08a5b0add9 Changed table header string and set the column width to percental value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 903
diff changeset
55 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
56 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
57 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
58
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 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
60 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
61 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
62
1498
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
63 final NumberFormat nf = NumberFormat.getDecimalFormat();
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
64
2460
5659b5e8c9a8 #204 Modified i18n strings in WQD table.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1498
diff changeset
65 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
66 value.setType(ListGridFieldType.FLOAT);
1498
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
67 value.setCellFormatter(new CellFormatter() {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
68 @Override
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
69 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
70 if (v == null) {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
71 return null;
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
72 }
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
73
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
74 try {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
75 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
76 return nf.format(value);
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
77 }
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
78 catch (NumberFormatException nfe) {
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
79 return v.toString();
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
80 }
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
81 }
ed16f28e9063 #196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1401
diff changeset
82 });
904
1e08a5b0add9 Changed table header string and set the column width to percental value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 903
diff changeset
83 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
84
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
85 setFields(addMax, addMin, select, 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
86 }
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
87
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
88 public void hideIconFields () {
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
89 hideField("max");
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
90 hideField("min");
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
91 hideField("select");
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
92 lockClick = true;
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
93 }
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
94
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
95
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
96 public void showIconFields() {
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
97 showField("max");
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
98 showField("min");
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
99 hideField("select");
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
100 lockClick = false;
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
101 }
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
102
3543
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
103 public void showSelect() {
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
104 showField("select");
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
105 hideField("max");
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
106 hideField("min");
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
107 }
14774fb42054 Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2460
diff changeset
108
1369
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
109 public boolean isLocked() {
1fae113b93fd Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 912
diff changeset
110 return lockClick;
912
2c8f1112be37 Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 904
diff changeset
111 }
5774
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
112
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
113 /**
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
114 * 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
115 * @return null if none found.
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
116 * */
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
117 public Double findRecordValue(String name) {
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
118 for (ListGridRecord record : getRecords()) {
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
119 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
120 return record.getAttributeAsDouble("value");
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
121 }
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
122 }
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
123 return null;
496c8c9d4913 issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5334
diff changeset
124 }
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
125 }
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
126 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org