# HG changeset patch # User Raimund Renkert # Date 1361883560 -3600 # Node ID 5f70c73b11ed740bc6a3fbef017d89300560e474 # Parent 15e856a64cddc6f53d3ea3b844b5b3f1f2eae107 Display gauge names in WQAdapted input panel instead of gauge range. diff -r 15e856a64cdd -r 5f70c73b11ed flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java Tue Feb 26 11:49:46 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java Tue Feb 26 13:59:20 2013 +0100 @@ -165,7 +165,7 @@ double[] mmW = gauge.determineMinMaxW(); elements.add(createItem( - cr, new String[] { from + ";" + to, ""}, mmQ, mmW)); + cr, new String[] { from + ";" + to, gauge.getName()}, mmQ, mmW)); } } else { @@ -186,7 +186,7 @@ double[] mmW = gauge.determineMinMaxW(); elements.add(createItem( - cr, new String[] { to + ";" + from, ""}, mmQ, mmW)); + cr, new String[] { to + ";" + from, gauge.getName()}, mmQ, mmW)); } } @@ -449,7 +449,7 @@ double lower = Double.parseDouble(parts[0]); double upper = Double.parseDouble(parts[1]); - String[] values = parts[2].split(","); + String[] values = parts[3].split(","); int num = values.length; double[] res = new double[num]; diff -r 15e856a64cdd -r 5f70c73b11ed flys-artifacts/src/main/java/de/intevation/flys/utils/DoubleUtil.java --- a/flys-artifacts/src/main/java/de/intevation/flys/utils/DoubleUtil.java Tue Feb 26 11:49:46 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/DoubleUtil.java Tue Feb 26 13:59:20 2013 +0100 @@ -177,7 +177,7 @@ vs.resetQuick(); - for (String valueStr: parts[2].split(",")) { + for (String valueStr: parts[3].split(",")) { vs.add(round(Double.parseDouble(valueStr.trim()))); } diff -r 15e856a64cdd -r 5f70c73b11ed flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Tue Feb 26 11:49:46 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Tue Feb 26 13:59:20 2013 +0100 @@ -252,6 +252,8 @@ String wqQ(); + String wqQatGauge(); + String wqQGauge(); String wqSingle(); diff -r 15e856a64cdd -r 5f70c73b11ed 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 Feb 26 11:49:46 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Tue Feb 26 13:59:20 2013 +0100 @@ -166,6 +166,7 @@ measurementStationPanelTitle = Measurement Station Information wqW = W at Gauge [cm] wqQ = Q [m\u00b3/s] +wqQatGauge = Q at Gauge [m\u00b3/s] wqWFree = W free position [m+NHN] wqQGauge = Discharge at Gauge wqSingle = Single values diff -r 15e856a64cdd -r 5f70c73b11ed 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 Feb 26 11:49:46 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Tue Feb 26 13:59:20 2013 +0100 @@ -154,6 +154,7 @@ measurementStationPanelTitle = Gew\u00e4sser/Messstellen-Info wqW = W am Pegel [cm] wqQ = Q [m\u00b3/s] +wqQatGauge = Q am Pegel [m\u00b3/s] wqWFree = W auf freier Strecke [m+NHN] wqQGauge = Kennzeichnender Abfluss am Pegel wqSingle = Einzelwerte diff -r 15e856a64cdd -r 5f70c73b11ed 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 Feb 26 11:49:46 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Tue Feb 26 13:59:20 2013 +0100 @@ -167,6 +167,7 @@ measurementStationPanelTitle = Measurement Station Information wqW = W at Gauge [cm] wqQ = Q [m\u00b3/s] +wqQatGauge = Q at Gauge [m\u00b3/s] wqWFree = W at free position [m+NHN] wqQGauge = Discharge at Gauge wqSingle = Single values diff -r 15e856a64cdd -r 5f70c73b11ed 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 Feb 26 11:49:46 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java Tue Feb 26 13:59:20 2013 +0100 @@ -22,6 +22,8 @@ protected TextItem ti; + private String title; + /** The constant input field name. */ public static final String FIELD_NAME = "doublearray"; @@ -50,6 +52,7 @@ BlurHandler handler, TitleOrientation titleOrientation) { + this.title = title; ti = new TextItem(FIELD_NAME); StaticTextItem sti = new StaticTextItem("staticarray"); @@ -263,5 +266,9 @@ public double[] getInputValues() { return getInputValues(ti); } + + public String getItemTitle() { + return this.title; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 15e856a64cdd -r 5f70c73b11ed flys-client/src/main/java/de/intevation/flys/client/client/ui/QSegmentedInputPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/QSegmentedInputPanel.java Tue Feb 26 11:49:46 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/QSegmentedInputPanel.java Tue Feb 26 13:59:20 2013 +0100 @@ -180,7 +180,7 @@ HLayout h = new HLayout(); String[] parts = gauge.split(GAUGE_PART_SEPARATOR); - String[] values = parts[2].split(VALUE_SEPARATOR); + String[] values = parts[3].split(VALUE_SEPARATOR); Label l = new Label(parts[0] + " - " + parts[1] + ": "); @@ -361,10 +361,10 @@ double[] values = dap.getInputValues(); if (wqvalue == null) { - wqvalue = createValueString(key, values); + wqvalue = createValueString(key + "; ", values); } else { - wqvalue += GAUGE_SEPARATOR + createValueString(key, values); + wqvalue += GAUGE_SEPARATOR + createValueString(key + "; ", values); } } diff -r 15e856a64cdd -r 5f70c73b11ed flys-client/src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java Tue Feb 26 11:49:46 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQAdaptedInputPanel.java Tue Feb 26 13:59:20 2013 +0100 @@ -202,9 +202,9 @@ HLayout h = new HLayout(); String[] parts = gauge.split(GAUGE_PART_SEPARATOR); - String[] values = parts[2].split(VALUE_SEPARATOR); + String[] values = parts[3].split(VALUE_SEPARATOR); - Label l = new Label(parts[0] + " - " + parts[1] + ": "); + Label l = new Label(parts[2] + ": "); StringBuilder sb = new StringBuilder(); boolean first = true; @@ -464,9 +464,9 @@ for (DataItem item: items) { String title = item.getLabel(); - + String label = item.getStringValue(); DoubleArrayPanel dap = new DoubleArrayPanel( - createLineTitle(title), null, this, TitleOrientation.LEFT); + label, null, this, TitleOrientation.LEFT); wqranges.put(title, dap); @@ -513,7 +513,7 @@ LinkedHashMap wqValues = new LinkedHashMap(); wqValues.put(FIELD_WQ_W, MSG.wqW()); - wqValues.put(FIELD_WQ_Q, MSG.wqQ()); + wqValues.put(FIELD_WQ_Q, MSG.wqQatGauge()); wq.setValueMap(wqValues); @@ -587,13 +587,14 @@ while (iter.hasNext()) { String key = iter.next(); DoubleArrayPanel dap = wqranges.get(key); + String label = dap.getItemTitle(); double[] values = dap.getInputValues(); if (wqvalue == null) { - wqvalue = createValueString(key, values); + wqvalue = createValueString(key + ";" + label, values); } else { - wqvalue += GAUGE_SEPARATOR + createValueString(key, values); + wqvalue += GAUGE_SEPARATOR + createValueString(key + ";" + label, values); } }