Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java @ 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 | 02d18d38fca7 |
children | 738010779c74 |
line wrap: on
line diff
--- 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);