Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/chart/AbstractChart.java @ 1119:7c4f81f74c47
merged gnv-artifacts
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:00 +0200 |
parents | f953c9a559d8 |
children |
comparison
equal
deleted
inserted
replaced
1027:fca4b5eb8d2f | 1119:7c4f81f74c47 |
---|---|
1 /* | |
2 * Copyright (c) 2010 by Intevation GmbH | |
3 * | |
4 * This program is free software under the LGPL (>=v2.1) | |
5 * Read the file LGPL.txt coming with the software for details | |
6 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
7 */ | |
8 | |
9 package de.intevation.gnv.chart; | |
10 | |
11 import java.util.Collection; | |
12 import java.util.Locale; | |
13 | |
14 import org.jfree.chart.ChartTheme; | |
15 import org.jfree.chart.JFreeChart; | |
16 | |
17 /** | |
18 * Abstract chart class to define the basic fields used for chart creation. | |
19 * | |
20 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
21 */ | |
22 public abstract class AbstractChart | |
23 implements Chart | |
24 { | |
25 /** | |
26 * JFreeChart object. Created after {@link #generateChart()} is called. | |
27 */ | |
28 protected JFreeChart chart; | |
29 | |
30 /** | |
31 * Field storing the visibility of lines in the chart plot. | |
32 */ | |
33 protected boolean linesVisible; | |
34 | |
35 /** | |
36 * Field storing the visibility of points in the chart plot. | |
37 */ | |
38 protected boolean shapesVisible; | |
39 | |
40 /** | |
41 * Locale object used for i18n support. | |
42 */ | |
43 protected Locale locale; | |
44 | |
45 /** | |
46 * ChartLabels | |
47 */ | |
48 protected ChartLabels labels; | |
49 | |
50 /** | |
51 * ChartTheme | |
52 */ | |
53 protected ChartTheme theme; | |
54 | |
55 /** | |
56 * Collection which contains a bunch of parameters. | |
57 */ | |
58 protected Collection parameters; | |
59 | |
60 /** | |
61 * Collection which contains a bunch of measurements. | |
62 */ | |
63 protected Collection measurements; | |
64 | |
65 /** | |
66 * Collection which contains all data objects used to be displayed in the | |
67 * chart. It contains different series and different datasets which is not | |
68 * very elegant. | |
69 */ | |
70 protected Collection resultSet; | |
71 | |
72 /** | |
73 * Collection which contains a bunch of date objects. | |
74 */ | |
75 protected Collection dates; | |
76 | |
77 /** | |
78 * Collection which contains a bunch of time gap definitions used to | |
79 * detect gaps in timeseries charts. | |
80 */ | |
81 protected Collection timeGaps; | |
82 | |
83 /** | |
84 * Abstract method which needs to be implemented by concrete subclasses. | |
85 * This method triggers the JFreeChart creation process. After calling this | |
86 * method {@link #chart} should be a valid <code>JFreeChart</code> object. | |
87 */ | |
88 public abstract JFreeChart generateChart(); | |
89 } | |
90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |