Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java @ 516:ba606e575663
ISSUE-85 (part II/III) Repaired broken location/range panel.
flys-client/trunk@1987 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 24 May 2011 10:52:00 +0000 |
parents | 8ea213bd8fba |
children | 7c57149e8715 |
rev | line source |
---|---|
78
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.server; |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.io.OutputStream; |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.io.IOException; |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import org.w3c.dom.Document; |
280
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
7 import org.w3c.dom.Element; |
78
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import javax.servlet.http.HttpServlet; |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import javax.servlet.http.HttpServletRequest; |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import javax.servlet.http.HttpServletResponse; |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
280
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
13 import de.intevation.artifacts.common.ArtifactNamespaceContext; |
213
7ea004d0ffbc
The ChartOutputTab calls the out() operation of a Collection now - no longer the out() of its first artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
14 import de.intevation.artifacts.common.utils.ClientProtocolUtils; |
280
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
15 import de.intevation.artifacts.common.utils.XMLUtils; |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
16 import de.intevation.artifacts.common.utils.XMLUtils.ElementCreator; |
213
7ea004d0ffbc
The ChartOutputTab calls the out() operation of a Collection now - no longer the out() of its first artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
17 |
78
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 import de.intevation.artifacts.httpclient.http.HttpClient; |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.artifacts.httpclient.http.HttpClientImpl; |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 /** |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 * This service is used to request a chart from the artifact server. The |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 * response is directed directly to the output stream, so the image that is |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 * retrieved is displayed in the UI afterwards. |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 * |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 */ |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 public class ChartOutputServiceImpl |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 extends HttpServlet |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 { |
280
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
32 /** The default chart width if no value is specified in the request.*/ |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
33 public static final int DEFAULT_CHART_WIDTH = 600; |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
34 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
35 /** The default chart height if no value is specified in the request.*/ |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
36 public static final int DEFAULT_CHART_HEIGHT = 400; |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
37 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
38 |
78
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 public void doGet(HttpServletRequest req, HttpServletResponse resp) { |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 System.out.println("ChartOutputServiceImpl.doGet"); |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 try { |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 OutputStream out = resp.getOutputStream(); |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 String serverUrl = req.getParameter("server"); |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 String uuid = req.getParameter("uuid"); |
213
7ea004d0ffbc
The ChartOutputTab calls the out() operation of a Collection now - no longer the out() of its first artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
47 String type = req.getParameter("type"); |
254
6838e4112eeb
Bugfix: the current locale string is used to fetch chart images now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
213
diff
changeset
|
48 String locale = req.getParameter("locale"); |
78
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 |
213
7ea004d0ffbc
The ChartOutputTab calls the out() operation of a Collection now - no longer the out() of its first artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
50 Document request = ClientProtocolUtils.newOutCollectionDocument( |
432
8ea213bd8fba
Adjusted a method signature of ClientProtocolUtils that has been changed in the last revision.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
51 uuid, type, type, getChartAttributes(req)); |
78
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 |
254
6838e4112eeb
Bugfix: the current locale string is used to fetch chart images now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
213
diff
changeset
|
53 HttpClient client = new HttpClientImpl(serverUrl, locale); |
213
7ea004d0ffbc
The ChartOutputTab calls the out() operation of a Collection now - no longer the out() of its first artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
78
diff
changeset
|
54 client.collectionOut(request, uuid, "chart", out); |
78
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 out.close(); |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 out.flush(); |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 } |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 catch (IOException ioe) { |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 System.err.println(ioe.getMessage()); |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 } |
280
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
62 catch (Exception e) { |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
63 System.err.println(e.getMessage()); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
64 } |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
65 } |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
66 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
67 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
68 /** |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
69 * This method returns a document which might contain parameters to adjust |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
70 * chart settings. The document is created using the information that are |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
71 * contained in the request object. |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
72 * |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
73 * @param req The request document. |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
74 * |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
75 * @return a document to adjust chart settings. |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
76 */ |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
77 protected Document getChartAttributes(HttpServletRequest req) { |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
78 Document doc = XMLUtils.newDocument(); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
79 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
80 ElementCreator ec = new ElementCreator( |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
81 doc, |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
82 ArtifactNamespaceContext.NAMESPACE_URI, |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
83 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
84 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
85 appendChartSize(req, doc, ec); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
86 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
87 return doc; |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
88 } |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
89 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
90 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
91 /** |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
92 * This method extracts the size (width/height) of a chart from request |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
93 * object and append those values - if they exist - to the attribute |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
94 * document used to adjust chart settings. |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
95 * |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
96 * @param req The request object that might contain the chart size. |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
97 * @param doc The attribute document used to adjust chart settings. |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
98 * @param ec The ElementCreator that might be used to create new Elements. |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
99 */ |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
100 protected void appendChartSize( |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
101 HttpServletRequest req, |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
102 Document doc, |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
103 ElementCreator ec) |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
104 { |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
105 Element size = ec.create("size"); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
106 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
107 String width = req.getParameter("width"); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
108 String height = req.getParameter("height"); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
109 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
110 if (width == null || height == null) { |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
111 width = Integer.toString(DEFAULT_CHART_WIDTH); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
112 height = Integer.toString(DEFAULT_CHART_HEIGHT); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
113 } |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
114 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
115 ec.addAttr(size, "width", width, true); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
116 ec.addAttr(size, "height", height, true); |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
117 |
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
118 doc.appendChild(size); |
78
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 } |
9ca5160cf080
Added a service that builds up requests to retrieve chart images. Use this service to display charts in the ChartOutputTab.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 } |
280
b493d606fdef
Enabled the client to request charts in different sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
254
diff
changeset
|
121 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |