Mercurial > dive4elements > river
changeset 3542:9647a6548320
Issue 664.
Made old value an i18n formated string.
flys-client/trunk@5355 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 04 Sep 2012 11:08:15 +0000 |
parents | ca0db8a0e01e |
children | 14774fb42054 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java |
diffstat | 2 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Tue Sep 04 10:45:11 2012 +0000 +++ b/flys-client/ChangeLog Tue Sep 04 11:08:15 2012 +0000 @@ -1,3 +1,10 @@ +2012-09-04 Raimund Renkert <raimund.renkert@intevation.de> + + Issue 664. + + * src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java: + Made old value an i18n formatted string. + 2012-09-04 Christian Lins <christian.lins@intevation.de> * src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java Tue Sep 04 10:45:11 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java Tue Sep 04 11:08:15 2012 +0000 @@ -601,7 +601,18 @@ Data dLocations = getData(items, "ld_locations"); DataItem[] lItems = dLocations.getItems(); - String value = lItems[0].getLabel(); + String[] splitted = lItems[0].getStringValue().split(" "); + String value = ""; + for (int i = 0; i < splitted.length; i++) { + try { + NumberFormat nf = NumberFormat.getDecimalFormat(); + double dv = Double.parseDouble(splitted[i]); + value += nf.format(dv) + " "; + } + catch(NumberFormatException nfe) { + value += splitted[i] + " "; + } + } Label selected = new Label(value); selected.setWidth(130);