Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java @ 912:2c8f1112be37
Rollback for input assistance of "Q/D" table.
The selectable icon columns are visible in all modes except of
"Q" input mode.
(Issue203)
flys-client/trunk@2771 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 16 Sep 2011 09:35:42 +0000 |
parents | 5341be7dec7a |
children | ca2d5bcf67a3 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java Thu Sep 15 17:01:12 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java Fri Sep 16 09:35:42 2011 +0000 @@ -156,6 +156,45 @@ public WQInputPanel() { qdTable = new QDTable(); wTable = new WTable(); + + initTableListeners(); + } + + + /** + * Initializes the listeners of the WQD tables. + */ + protected void initTableListeners() { + CellClickHandler handler = new CellClickHandler() { + public void onCellClick(CellClickEvent e) { + if (isWMode()) { + return; + } + + int idx = e.getColNum(); + Record r = e.getRecord (); + double val = r.getAttributeAsDouble("value"); + + if (idx == 0) { + if (isRangeMode()) { + qRangePanel.setFrom(val); + } + else { + qArrayPanel.addValue(val); + } + } + else if (idx == 1) { + if (isRangeMode()) { + qRangePanel.setTo(val); + } + else { + qArrayPanel.addValue(val); + } + } + } + }; + + qdTable.addCellClickHandler(handler); } @@ -982,6 +1021,13 @@ inputMode = form.getValueAsString(FIELD_MODE); } + if (wqMode.equals("Q")) { + qdTable.hideIconFields(); + } + else { + qdTable.showIconFields(); + } + updatePanels(wqMode, inputMode); }