Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/MousePositionPanel.java @ 1598:ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
flys-client/trunk@3931 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 06 Feb 2012 14:43:27 +0000 |
parents | 78907f0fb939 |
children | 936e3e6cd9b9 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/MousePositionPanel.java Mon Feb 06 13:27:05 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/MousePositionPanel.java Mon Feb 06 14:43:27 2012 +0000 @@ -75,8 +75,8 @@ * * @param x the new x value. */ - public void setX(double x) { - this.x.setContents(nf.format(x)); + public void setX(String x) { + this.x.setContents(x); } @@ -85,8 +85,8 @@ * * @param y the new y value. */ - public void setY(double y) { - this.y.setContents(nf.format(y)); + public void setY(String y) { + this.y.setContents(y); } @@ -121,10 +121,12 @@ x = x - xOffset; y = y - yOffset; - double[] xy = transformer.transform(x,y); + double[] xy = transformer.transform(x,y); + String[] xyStr = transformer.format(new Number[] { + new Double(xy[0]), new Double(xy[1]) }); - setX(xy[0]); - setY(xy[1]); + setX(xyStr[0]); + setY(xyStr[1]); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :