annotate gnv/src/main/java/de/intevation/gnv/action/CreateChartAction.java @ 690:254f062e334b

Added JavaDoc. gnv/trunk@908 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 12 Apr 2010 16:45:16 +0000
parents 57fa8019fbdc
children 0441e78cd900
rev   line source
571
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.gnv.action;
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
587
602521c3fac3 Reset diagram options after switching from chart to histogram or the other way around (issue190).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 571
diff changeset
3 import de.intevation.gnv.action.sessionmodel.SessionModel;
602521c3fac3 Reset diagram options after switching from chart to histogram or the other way around (issue190).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 571
diff changeset
4 import de.intevation.gnv.action.sessionmodel.SessionModelFactory;
602521c3fac3 Reset diagram options after switching from chart to histogram or the other way around (issue190).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 571
diff changeset
5
571
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import javax.servlet.http.HttpServletRequest;
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 import javax.servlet.http.HttpServletResponse;
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 import org.apache.log4j.Logger;
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import org.apache.struts.action.ActionForm;
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import org.apache.struts.action.ActionForward;
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 import org.apache.struts.action.ActionMapping;
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 /**
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
16 * This controller is called to display charts.<br>
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
17 * An attribute 'chart' on the request object is activated which inserts an
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
18 * image calling a chart output of the server.
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
19 *
684
57fa8019fbdc Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 683
diff changeset
20 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
571
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 */
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 public class CreateChartAction extends DescribeUIAction {
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 private static Logger logger = Logger.getLogger(CreateChartAction.class);
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 public CreateChartAction() {
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 super();
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 }
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 @Override
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 public ActionForward execute(
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 ActionMapping mapping,
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 ActionForm form,
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 HttpServletRequest request,
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 HttpServletResponse response)
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 throws Exception {
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 logger.debug("Create chart.");
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40
587
602521c3fac3 Reset diagram options after switching from chart to histogram or the other way around (issue190).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 571
diff changeset
41 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(
602521c3fac3 Reset diagram options after switching from chart to histogram or the other way around (issue190).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 571
diff changeset
42 request);
602521c3fac3 Reset diagram options after switching from chart to histogram or the other way around (issue190).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 571
diff changeset
43 sm.setDiagrammOptions(null);
571
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 request.setAttribute("chart", true);
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 return super.execute(mapping, form, request, response);
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 }
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 }
f2ba58011a2d Added histogram option panel. Show chart/histogram options panel after the user selected chart or histogram. Moved options panel beneath action panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org