Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/shared/Transform2D.java @ 5792:06036bc6fb19
Add WMS URL menu entry again and print the wms_url
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 23 Apr 2013 15:30:06 +0200 |
parents | ef745bc6bed9 |
children |
rev | line source |
---|---|
535
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.shared; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
1598
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
4 import java.util.Date; |
535
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
610
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
6 import com.google.gwt.core.client.GWT; |
1598
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
7 import com.google.gwt.i18n.client.DateTimeFormat; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
8 import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
9 import com.google.gwt.i18n.client.NumberFormat; |
610
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
10 |
535
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 /** |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 * This object supports a linear transformation to transform xy coordinates into |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 * an other coordinate system based on scale and translation values. |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 * |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 */ |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 public class Transform2D implements Serializable { |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
1598
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
20 protected String xType; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
21 protected String yType; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
22 |
535
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 protected double sx; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 protected double sy; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 protected double tx; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 protected double ty; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 public Transform2D() { |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 } |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 /** |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 * Creates a new transformation with scale and translation factors. |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 * |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 * @param sx The scale factor for the x axis. |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 * @param sy The scale factor for the y axis. |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 * @param tx The translation factor for the x axis. |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 * @param ty The translation factor for the y axis. |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 */ |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 public Transform2D(double sx, double sy, double tx, double ty) { |
1598
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
43 this(sx, sy, tx, ty, "number", "number"); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
44 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
45 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
46 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
47 public Transform2D( |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
48 double sx, double sy, |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
49 double tx, double ty, |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
50 String xType, |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
51 String yType |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
52 ) { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
53 this.xType = xType; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
54 this.yType = yType; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
55 |
535
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 this.sx = sx; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 this.sy = sy; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 this.tx = tx; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 this.ty = ty; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 } |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 /** |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 * Transforms the pixel x and y into a new coordinate system based on the |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 * scale and translation values specified in the constructor. |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 */ |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 public double[] transform(double x, double y) { |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 double resX = sx * x + tx; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 double resY = sy * y + ty; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 return new double[] { resX, resY }; |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 } |
610
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
73 |
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
74 |
1598
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
75 public String[] format(Number[] xy) { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
76 String x = null; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
77 String y = null; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
78 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
79 if (xType.equals("date")) { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
80 x = formatDate(xy[0].longValue()); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
81 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
82 else { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
83 x = formatNumber(xy[0].doubleValue()); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
84 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
85 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
86 if (yType.equals("date")) { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
87 y = formatDate(xy[1].longValue()); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
88 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
89 else { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
90 y = formatNumber(xy[1].doubleValue()); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
91 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
92 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
93 return new String[] { x, y }; |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
94 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
95 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
96 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
97 protected String formatDate(long time) { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
98 Date date = new Date(time); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
99 DateTimeFormat df = getDateTimeFormat(); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
100 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
101 return df.format(date); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
102 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
103 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
104 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
105 protected String formatNumber(double number) { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
106 NumberFormat nf = getNumberFormat(); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
107 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
108 return nf.format(number); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
109 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
110 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
111 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
112 public DateTimeFormat getDateTimeFormat() { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
113 return DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
114 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
115 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
116 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
117 public NumberFormat getNumberFormat() { |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
118 return NumberFormat.getDecimalFormat(); |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
119 } |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
120 |
ef745bc6bed9
Distinguish between numbers and dates while parsing chart info documents; the MousePosition panel now displays the position on date axes correctly.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
610
diff
changeset
|
121 |
610
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
122 public void dumpGWT() { |
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
123 GWT.log("SX = " + sx); |
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
124 GWT.log("SY = " + sy); |
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
125 GWT.log("TX = " + tx); |
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
126 GWT.log("TY = " + ty); |
ea2191b1299d
#170 Changed the DOM manipulation while zoom and drag operation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
535
diff
changeset
|
127 } |
535
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 } |
017371801479
Added a chart info service to fetch the info document for a specific chart from artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |