changeset 2451:c1292aab6aa9

Issue 553. Cut the last 3 digits. This solves the problem desrcibed in Issue 553 and is now the same behaviour as in module 'new map'. flys-client/trunk@4134 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 08 Mar 2012 15:33:42 +0000
parents 0537faaa9848
children 0235cdb62c98
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Mar 08 13:54:33 2012 +0000
+++ b/flys-client/ChangeLog	Thu Mar 08 15:33:42 2012 +0000
@@ -1,3 +1,10 @@
+2012-03-08  Raimund Renkert <raimund.renkert@intevation.de>
+
+	Issue 553.
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java:
+	  Cut the last 3 digits.
+
 2012-03-08  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java	Thu Mar 08 13:54:33 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPositionPanel.java	Thu Mar 08 15:33:42 2012 +0000
@@ -1,5 +1,7 @@
 package de.intevation.flys.client.client.ui.map;
 
+import com.google.gwt.i18n.client.NumberFormat;
+
 import com.smartgwt.client.types.Alignment;
 import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.layout.HLayout;
@@ -62,12 +64,14 @@
 
 
     protected void setX(double x) {
-        this.x.setContents(String.valueOf(x));
+        NumberFormat f = NumberFormat.getFormat("#0.0000");
+        this.x.setContents(f.format(x).toString());
     }
 
 
     protected void setY(double y) {
-        this.y.setContents(String.valueOf(y));
+        NumberFormat f = NumberFormat.getFormat("#0.0000");
+        this.y.setContents(f.format(y).toString());
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org