Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/wq/QDTable.java @ 5861:172338b1407f
GWT client: Added copyright header.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 14:30:15 +0200 |
parents | 5aa05a7a34b7 |
children | ea9eef426962 |
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 * |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
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 |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
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 /** |
4986
3b9f6765d9dc
QDTable: Doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3543
diff
changeset
|
25 * 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
|
26 * @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
|
27 */ |
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 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
|
29 |
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 /** 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
|
31 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
|
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 |
1369
1fae113b93fd
Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
912
diff
changeset
|
34 protected boolean lockClick; |
1fae113b93fd
Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
912
diff
changeset
|
35 |
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
|
36 public QDTable() { |
1399 | 37 String baseUrl = GWT.getHostPageBaseURL(); |
38 | |
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
|
39 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
|
40 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
|
41 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
|
42 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
|
43 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
|
44 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
|
45 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
|
46 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
|
47 |
3543
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
48 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
|
49 addMax.setType(ListGridFieldType.ICON); |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
50 addMax.setWidth(30); |
1399 | 51 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
|
52 |
3543
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
53 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
|
54 addMin.setType(ListGridFieldType.ICON); |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
55 addMin.setWidth(30); |
1399 | 56 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
|
57 |
3543
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
58 ListGridField select = new ListGridField("select", MESSAGE.selection()); |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
59 select.setType(ListGridFieldType.ICON); |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
60 select.setWidth(70); |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
61 select.setCellIcon(baseUrl + MESSAGE.markerGreen()); |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
62 |
904
1e08a5b0add9
Changed table header string and set the column width to percental value.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
903
diff
changeset
|
63 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
|
64 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
|
65 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
|
66 |
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
|
67 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
|
68 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
|
69 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
|
70 |
1498
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
71 final NumberFormat nf = NumberFormat.getDecimalFormat(); |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
72 |
2460
5659b5e8c9a8
#204 Modified i18n strings in WQD table.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1498
diff
changeset
|
73 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
|
74 value.setType(ListGridFieldType.FLOAT); |
1498
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
75 value.setCellFormatter(new CellFormatter() { |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
76 @Override |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
77 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
|
78 if (v == null) { |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
79 return null; |
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 try { |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
83 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
|
84 return nf.format(value); |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
85 } |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
86 catch (NumberFormatException nfe) { |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
87 return v.toString(); |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
88 } |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
89 } |
ed16f28e9063
#196 Localize numbers in W/Q/D tables.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1401
diff
changeset
|
90 }); |
904
1e08a5b0add9
Changed table header string and set the column width to percental value.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
903
diff
changeset
|
91 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
|
92 |
3543
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
93 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
|
94 } |
912
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 hideIconFields () { |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
97 hideField("max"); |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
98 hideField("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 = true; |
912
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
101 } |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
102 |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
103 |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
104 public void showIconFields() { |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
105 showField("max"); |
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
106 showField("min"); |
3543
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
107 hideField("select"); |
1369
1fae113b93fd
Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
912
diff
changeset
|
108 lockClick = false; |
1fae113b93fd
Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
912
diff
changeset
|
109 } |
1fae113b93fd
Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
912
diff
changeset
|
110 |
3543
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
111 public void showSelect() { |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
112 showField("select"); |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
113 hideField("max"); |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
114 hideField("min"); |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
115 } |
14774fb42054
Issue 808.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2460
diff
changeset
|
116 |
1369
1fae113b93fd
Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
912
diff
changeset
|
117 public boolean isLocked() { |
1fae113b93fd
Issue 118/203.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
912
diff
changeset
|
118 return lockClick; |
912
2c8f1112be37
Rollback for input assistance of "Q/D" table.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
904
diff
changeset
|
119 } |
5774
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
120 |
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 * 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
|
123 * @return null if none found. |
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
124 * */ |
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
125 public Double findRecordValue(String name) { |
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
126 for (ListGridRecord record : getRecords()) { |
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
127 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
|
128 return record.getAttributeAsDouble("value"); |
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
129 } |
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
130 } |
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
131 return null; |
496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5334
diff
changeset
|
132 } |
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
|
133 } |
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
|
134 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |