# HG changeset patch # User Raimund Renkert # Date 1319549536 0 # Node ID 1fae113b93fd1010fce339395e4ce9a255c36297 # Parent ec0c81f2c7a46dcf7a7d8679dea1bb1c5b2fc471 Issue 118/203. Lock table for Q input and clear values on input change. Updated i18n strings. flys-client/trunk@3074 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r ec0c81f2c7a4 -r 1fae113b93fd flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Oct 25 12:41:16 2011 +0000 +++ b/flys-client/ChangeLog Tue Oct 25 13:32:16 2011 +0000 @@ -1,3 +1,22 @@ +2011-10-25 Raimund Renkert + + Issue 118/203 + + * src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java: + Added attribute to lock the table if the input rows are hidden. + + * src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java: + Ignore clicks if the table is locked and clear values on input mehtod + change. + + * src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java: + Clear the input values if the input array length is 0. + + * src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties, + src/main/java/de/intevation/flys/client/client/FLYSConstants.properties, + src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties: + Updated i18n strings. + 2011-10-25 Ingo Weinzierl * src/main/java/de/intevation/flys/client/server/LoadArtifactServiceImpl.java, diff -r ec0c81f2c7a4 -r 1fae113b93fd flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Tue Oct 25 12:41:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Tue Oct 25 13:32:16 2011 +0000 @@ -93,7 +93,7 @@ helperPanelTitle = Input Support wqW = W at Gauge [cm] wqQ = Q [m\u00b3/s] -wqQGauge = Q [m\u00b3/s] at Gauge +wqQGauge = Discharge at Gauge wqSingle = Single values wqRange = Range unitWNN = W [NN+m] diff -r ec0c81f2c7a4 -r 1fae113b93fd flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Tue Oct 25 12:41:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Tue Oct 25 13:32:16 2011 +0000 @@ -94,7 +94,7 @@ helperPanelTitle = Eingabeunterst\u00fctzung wqW = W am Pegel [cm] wqQ = Q [m\u00b3/s] -wqQGauge = Q [m\u00b3/s] am Pegel +wqQGauge = Kennzeichnender Abfluss am Pegel wqSingle = Einzelwerte wqRange = Wertebereich unitWNN = W [NN+m] diff -r ec0c81f2c7a4 -r 1fae113b93fd flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Tue Oct 25 12:41:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Tue Oct 25 13:32:16 2011 +0000 @@ -88,7 +88,7 @@ helperPanelTitle = Input Support wqW = W at Gauge [cm] wqQ = Q [m³/s] -wqQGauge = Q [m³/s] at Gauge +wqQGauge = Discharge at Gauge wqSingle = Single values wqRange = Range unitWNN = W [NN+m] diff -r ec0c81f2c7a4 -r 1fae113b93fd flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java Tue Oct 25 12:41:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java Tue Oct 25 13:32:16 2011 +0000 @@ -100,6 +100,10 @@ public void setValues(double[] values) { NumberFormat f = NumberFormat.getDecimalFormat(); + if(values.length == 0) { + ti.clearValue(); + return; + } StringBuilder text = new StringBuilder(); boolean firstItem = true; if (values != null) { diff -r ec0c81f2c7a4 -r 1fae113b93fd flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java Tue Oct 25 12:41:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java Tue Oct 25 13:32:16 2011 +0000 @@ -167,7 +167,7 @@ protected void initTableListeners() { CellClickHandler handler = new CellClickHandler() { public void onCellClick(CellClickEvent e) { - if (isWMode()) { + if (isWMode() || qdTable.isLocked()) { return; } @@ -1118,6 +1118,8 @@ } else { qdTable.showIconFields(); + double[] empty = {}; + valuesQ = empty; } updatePanels(wqMode, inputMode); diff -r ec0c81f2c7a4 -r 1fae113b93fd flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java Tue Oct 25 12:41:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java Tue Oct 25 13:32:16 2011 +0000 @@ -22,6 +22,8 @@ /** The interface that provides the image resources. */ private FLYSImages IMAGES = GWT.create(FLYSImages.class); + protected boolean lockClick; + public QDTable() { setWidth100(); setHeight100(); @@ -60,12 +62,18 @@ public void hideIconFields () { hideField("max"); hideField("min"); + lockClick = true; } public void showIconFields() { showField("max"); showField("min"); + lockClick = false; + } + + public boolean isLocked() { + return lockClick; } }