Mercurial > dive4elements > river
changeset 2887:12f58f719125
Changed numbers in gauge sector selection state to strings.
flys-client/trunk@4570 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 01 Jun 2012 11:08:35 +0000 |
parents | bd16493cc0da |
children | 55ea5474e11e |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java |
diffstat | 2 files changed, 18 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Fri Jun 01 10:49:10 2012 +0000 +++ b/flys-client/ChangeLog Fri Jun 01 11:08:35 2012 +0000 @@ -1,3 +1,8 @@ +2012-06-01 Raimund Renkert <raimund.renkert@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java: + Changed numbers in gauge sector selection state to strings. + 2012-06-01 Raimund Renkert <raimund.renkert@intevation.de> * src/main/java/de/intevation/flys/client/client/ui/fixation/FixPeriodPanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java Fri Jun 01 10:49:10 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java Fri Jun 01 11:08:35 2012 +0000 @@ -43,8 +43,17 @@ protected SelectItem from; protected SelectItem to; + protected LinkedHashMap mapValues; + public FixGaugeSelectPanel() { htmlOverview = ""; + mapValues = new LinkedHashMap(); + mapValues.put("0", "Q \u2208 [0, (MNQ + MQ)/2"); + mapValues.put("1", "Q \u2208 [(MNQ + MQ)/2, (MQ + MHQ)/2]"); + mapValues.put("2", "Q \u2208 [(MQ + MHQ)/2, HQ5]"); + mapValues.put("3", "Q \u2208 [HQ5, \u221e]"); + + } public Canvas createWidget(DataList data) { @@ -55,20 +64,14 @@ Label title = new Label(MESSAGES.gauge_class()); title.setHeight(25); - LinkedHashMap map = new LinkedHashMap(); - map.put("0", "0"); - map.put("1", "1"); - map.put("2", "2"); - map.put("3", "3"); - from = new SelectItem(MESSAGES.from()); to = new SelectItem(MESSAGES.to()); from.setShowTitle(false); to.setShowTitle(false); - from.setValueMap(map); + from.setValueMap(mapValues); from.setWidth(60); - to.setValueMap(map); + to.setValueMap(mapValues); to.setWidth(60); DynamicForm form = new DynamicForm(); @@ -94,9 +97,9 @@ DataItem[] tItems = t.getItems(); StringBuilder sb = new StringBuilder(); - sb.append(fItems[0].getLabel()); + sb.append(mapValues.get(fItems[0].getLabel())); sb.append(" " + MESSAGES.to() + " "); - sb.append(tItems[0].getLabel()); + sb.append(mapValues.get(tItems[0].getLabel())); Label old = new Label(sb.toString()); old.setWidth(130);