Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalCrossProfileChart.java @ 1071:9bb1979aabbe
Added a new output state and chart type for vertical profiles using vector data.
gnv-artifacts/trunk@1168 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 07 Jun 2010 15:00:23 +0000 |
parents | e8a9e84a0328 |
children | f953c9a559d8 |
rev | line source |
---|---|
365
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.chart; |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
767
diff
changeset
|
3 import de.intevation.gnv.geobackend.base.Result; |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
767
diff
changeset
|
4 |
365
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import java.util.Collection; |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import java.util.Locale; |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import org.apache.log4j.Logger; |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import org.jfree.chart.ChartTheme; |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
767
diff
changeset
|
11 |
365
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import org.jfree.data.general.Series; |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 /** |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
15 * Implementation to create a special type of horizontal profile charts. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
16 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
17 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
365
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 */ |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 public class HorizontalCrossProfileChart |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 extends HorizontalProfileChart |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 { |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
22 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
23 * Logger used for logging with log4j. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
24 */ |
365
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 private static Logger log = Logger.getLogger(HorizontalCrossProfileChart.class); |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
27 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
28 * Constructor to create HorizontalCrossProfileChart objects. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
29 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
30 * @param labels Labels used to be displayed in title, subtitle and so on. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
31 * @param theme ChartTheme used to adjust the rendering of this chart. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
32 * @param parameters Collection containing a bunch of parameters. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
33 * @param measurements Collection containing a bunch of measurements. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
34 * @param dates Collection containing a bunch of date objects. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
35 * @param result Collection containing a bunch of <code>Result</code> |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
36 * objects which contain the actual data items to be displayed. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
37 * @param timeGaps Collection with timegap definitions. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
38 * @param locale Locale used to specify the format of labels, numbers, ... |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
39 * @param linesVisible Render lines between data points if true, otherwise |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
40 * not. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
41 * @param shapesVisible Render vertices as points if true, otherwise not. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
42 */ |
365
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 public HorizontalCrossProfileChart( |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 ChartLabels labels, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 ChartTheme theme, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 Collection parameters, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 Collection measurements, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 Collection dates, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 Collection result, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 Collection timeGaps, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 Locale locale, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 boolean linesVisible, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 boolean shapesVisible |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 ) { |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 super( |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 labels, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 theme, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 parameters, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 measurements, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 dates, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 result, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 timeGaps, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 locale, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 linesVisible, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 shapesVisible |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 ); |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 } |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 |
767
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
70 /** |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
71 * Method for gap detection. Nothing is done here, because in this type of |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
72 * chart no gap detection takes place. |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
73 * |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
74 * @see de.intevation.gnv.chart.HorizontalProfileChart#gapDetection(Result[], |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
75 * Series, int, int) |
79401c871da4
Added and repaired javadoc in de.intevation.gnv.chart package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
417
diff
changeset
|
76 */ |
365
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 @Override |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 protected void gapDetection( |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 Result[] results, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 Series series, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 int startPos, |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 int endPos |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 ) { |
417
9697675ede21
Removed warning, which told the user that no gap detection is implemented for horizontalcrossprofile charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
365
diff
changeset
|
84 // nothing to do here, gap detection is done in interpolation |
365
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 } |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 } |
f66088a43ecc
Added horizontal crossprofile charts to chart pallet. Fixed some bugs before interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |