Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java @ 2138:59bb5c895be3
Improved HYK/Zones- handling.
flys-artifacts/trunk@3716 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 19 Jan 2012 11:00:27 +0000 |
parents | d626ae185305 |
children | c5d24e0587ce |
rev | line source |
---|---|
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.exports; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
2042
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
3 import java.util.List; |
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
4 |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
5 import org.apache.log4j.Logger; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
6 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 import org.jfree.chart.JFreeChart; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
8 import org.jfree.chart.title.TextTitle; |
1116
05e4ef0f9489
Improved stub for CrossSections (including Factory and Facet).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1113
diff
changeset
|
9 import org.jfree.data.xy.XYSeries; |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 |
2138
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
11 import de.intevation.flys.jfree.FLYSAnnotation; |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
12 |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
13 import org.w3c.dom.Document; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 |
2074
a026d005accd
Moved JFreeChart specific classes to de.intevation.flys.jfree and added required imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2064
diff
changeset
|
15 import de.intevation.artifacts.DataProvider; |
a026d005accd
Moved JFreeChart specific classes to de.intevation.flys.jfree and added required imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2064
diff
changeset
|
16 |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
17 import de.intevation.artifactdatabase.state.ArtifactAndFacet; |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.flys.artifacts.model.FacetTypes; |
2042
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
20 import de.intevation.flys.artifacts.model.CrossSectionFacet; |
2074
a026d005accd
Moved JFreeChart specific classes to de.intevation.flys.jfree and added required imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2064
diff
changeset
|
21 import de.intevation.flys.jfree.StyledXYSeries; |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 |
2126
d626ae185305
Use the fast cross section lines from backend now.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2120
diff
changeset
|
23 import de.intevation.flys.model.FastCrossSectionLine; |
2138
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
24 import de.intevation.flys.artifacts.model.HYKFactory; |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
25 |
2120
f021080cb409
Use improved caching for cross section lines data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2107
diff
changeset
|
26 |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 /** |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 * An OutGenerator that generates cross section graphs. |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 */ |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 public class CrossSectionGenerator |
2138
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
31 extends LongitudinalSectionGenerator |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
32 implements FacetTypes |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 { |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 /** The logger that is used in this generator. */ |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
35 private static Logger logger = |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
36 Logger.getLogger(CrossSectionGenerator.class); |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
37 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
38 public static final String I18N_CHART_TITLE = |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
39 "chart.cross_section.title"; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
40 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
41 public static final String I18N_CHART_SUBTITLE = |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
42 "chart.cross_section.subtitle"; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
43 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
44 public static final String I18N_XAXIS_LABEL = |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
45 "chart.cross_section.xaxis.label"; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
46 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
47 public static final String I18N_YAXIS_LABEL = |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
48 "chart.cross_section.yaxis.label"; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
49 |
1125
65d8b3340397
Cleanups of CrossSection*.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1122
diff
changeset
|
50 public static final String I18N_CHART_TITLE_DEFAULT = "Querprofildiagramm"; |
65d8b3340397
Cleanups of CrossSection*.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1122
diff
changeset
|
51 public static final String I18N_XAXIS_LABEL_DEFAULT = "Abstand [m]"; |
65d8b3340397
Cleanups of CrossSection*.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1122
diff
changeset
|
52 public static final String I18N_YAXIS_LABEL_DEFAULT = "W [NN + m]"; |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
53 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
54 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
55 /** Trivial Constructor. */ |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
56 public CrossSectionGenerator() { |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
57 super(); |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
58 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
59 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
60 |
2052
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
61 @Override |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
62 protected YAxisWalker getYAxisWalker() { |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
63 return new YAxisWalker() { |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
64 @Override |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
65 public int length() { |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
66 return 1; |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
67 } |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
68 |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
69 /** Get identifier for this index. */ |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
70 @Override |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
71 public String getId(int idx) { |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
72 return "W"; |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
73 } |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
74 }; |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
75 } |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
76 |
c7f18fa0d685
Added missing getYAxisWalker() in CrossSectionGenerator and create new instances of IdentfifiableNumberAxis in XYChartGenerator.createYAxis(int).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2051
diff
changeset
|
77 |
1125
65d8b3340397
Cleanups of CrossSection*.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1122
diff
changeset
|
78 /** |
65d8b3340397
Cleanups of CrossSection*.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1122
diff
changeset
|
79 * Get localized chart title. |
65d8b3340397
Cleanups of CrossSection*.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1122
diff
changeset
|
80 */ |
2048
3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2044
diff
changeset
|
81 @Override |
2104
bb0dede9294f
Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2074
diff
changeset
|
82 public String getDefaultChartTitle() { |
1141
bcba246d9c03
Fix various issues like i18n in cross section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1125
diff
changeset
|
83 Object[] i18n_msg_args = new Object[] { |
bcba246d9c03
Fix various issues like i18n in cross section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1125
diff
changeset
|
84 getRiverName() |
bcba246d9c03
Fix various issues like i18n in cross section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1125
diff
changeset
|
85 }; |
bcba246d9c03
Fix various issues like i18n in cross section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1125
diff
changeset
|
86 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT, i18n_msg_args); |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
87 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
88 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
89 |
2138
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
90 /** Always return default subtitle. */ |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
91 @Override |
1989
156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1975
diff
changeset
|
92 protected String getChartSubtitle() { |
2048
3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2044
diff
changeset
|
93 // XXX NOTE: overriding this method disables ChartSettings subtitle! |
2138
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
94 // TODO clarify XXX NOTE |
2048
3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2044
diff
changeset
|
95 return getDefaultChartSubtitle(); |
3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2044
diff
changeset
|
96 } |
3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2044
diff
changeset
|
97 |
3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2044
diff
changeset
|
98 |
2138
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
99 /** Get Charts default subtitle. */ |
2048
3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2044
diff
changeset
|
100 @Override |
3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2044
diff
changeset
|
101 protected String getDefaultChartSubtitle() { |
2042
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
102 List<DataProvider> providers = |
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
103 context.getDataProvider(CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA); |
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
104 double km = 0d; |
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
105 if (providers.size() > 0) { |
2120
f021080cb409
Use improved caching for cross section lines data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2107
diff
changeset
|
106 FastCrossSectionLine csl = (FastCrossSectionLine) providers.get(0). |
2042
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
107 provideData(CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA, |
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
108 null, context); |
2120
f021080cb409
Use improved caching for cross section lines data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2107
diff
changeset
|
109 km = csl.getKm(); |
2042
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
110 } |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
111 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
112 Object[] args = new Object[] { |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
113 getRiverName(), |
2042
3f6b519300ec
Include selected km in cross section diagrams subtitle.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2033
diff
changeset
|
114 km |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
115 }; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
116 |
1989
156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1975
diff
changeset
|
117 return msg(I18N_CHART_SUBTITLE, "", args); |
156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1975
diff
changeset
|
118 } |
156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1975
diff
changeset
|
119 |
156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1975
diff
changeset
|
120 |
156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1975
diff
changeset
|
121 @Override |
156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1975
diff
changeset
|
122 protected void addSubtitles(JFreeChart chart) { |
156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1975
diff
changeset
|
123 String subtitle = getChartSubtitle(); |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
124 chart.addSubtitle(new TextTitle(subtitle)); |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
125 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
126 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
127 |
2051
4ba5036109d2
Make use of user defined axes labels during chart creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2048
diff
changeset
|
128 @Override |
4ba5036109d2
Make use of user defined axes labels during chart creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2048
diff
changeset
|
129 protected String getDefaultXAxisLabel() { |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
130 return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT); |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
131 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
132 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
133 |
2051
4ba5036109d2
Make use of user defined axes labels during chart creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2048
diff
changeset
|
134 @Override |
4ba5036109d2
Make use of user defined axes labels during chart creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2048
diff
changeset
|
135 protected String getDefaultYAxisLabel(int pos) { |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
136 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
137 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
138 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
139 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
140 /** |
1116
05e4ef0f9489
Improved stub for CrossSections (including Factory and Facet).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1113
diff
changeset
|
141 * Let one facet do its job. |
05e4ef0f9489
Improved stub for CrossSections (including Factory and Facet).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1113
diff
changeset
|
142 */ |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
143 public void doOut( |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
144 ArtifactAndFacet artifactFacet, |
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
145 Document attr, |
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
146 boolean visible |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
147 ) { |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
148 String name = artifactFacet.getFacetName(); |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
149 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
150 logger.debug("CrossSectionGenerator.doOut: " + name); |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
151 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
152 if (name == null) { |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
153 logger.error("No facet name for doOut(). No output generated!"); |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
154 return; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
155 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
156 |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
157 if (name.equals(CROSS_SECTION)) { |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
158 doCrossSectionOut( |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
159 artifactFacet.getData(context), |
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
160 artifactFacet.getFacetDescription(), |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
161 attr, |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
162 visible); |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
163 } |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
164 else if (name.equals(CROSS_SECTION_WATER_LINE)) { |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
165 doCrossSectionWaterLineOut( |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
166 artifactFacet.getData(context), |
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1931
diff
changeset
|
167 artifactFacet.getFacetDescription(), |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
168 attr, |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
169 visible); |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
170 } |
2020
4f7f781e4481
Improved area rendering workflow.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2006
diff
changeset
|
171 else if (FacetTypes.IS.AREA(name)) { |
2006
5aecebcc4698
Add area dataseries when facet delivers one.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1989
diff
changeset
|
172 doArea(artifactFacet.getData(context), |
5aecebcc4698
Add area dataseries when facet delivers one.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1989
diff
changeset
|
173 artifactFacet.getFacetDescription(), |
5aecebcc4698
Add area dataseries when facet delivers one.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1989
diff
changeset
|
174 attr, |
5aecebcc4698
Add area dataseries when facet delivers one.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1989
diff
changeset
|
175 visible); |
5aecebcc4698
Add area dataseries when facet delivers one.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1989
diff
changeset
|
176 } |
2138
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
177 else if (name.equals(HYK)) { |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
178 doHyk(artifactFacet.getData(context), |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
179 artifactFacet.getFacetDescription(), |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
180 attr, |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
181 visible); |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
182 } |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
183 else { |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
184 logger.warn("CrossSection.doOut: Unknown facet name: " + name); |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
185 return; |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
186 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
187 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
188 |
2020
4f7f781e4481
Improved area rendering workflow.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2006
diff
changeset
|
189 |
2104
bb0dede9294f
Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2074
diff
changeset
|
190 /** Look up the axis identifier for a given facet type. */ |
bb0dede9294f
Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2074
diff
changeset
|
191 public int axisIdxForFacet(String facetName) { |
bb0dede9294f
Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2074
diff
changeset
|
192 // TODO Where to add thid axis too. |
bb0dede9294f
Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2074
diff
changeset
|
193 return 0; |
2006
5aecebcc4698
Add area dataseries when facet delivers one.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1989
diff
changeset
|
194 } |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
195 |
2020
4f7f781e4481
Improved area rendering workflow.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2006
diff
changeset
|
196 |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
197 /** |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
198 * Do cross sections waterline out. |
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
199 * |
1141
bcba246d9c03
Fix various issues like i18n in cross section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1125
diff
changeset
|
200 * @param seriesName name of the data (line) to display in legend. |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
201 * @param theme Theme for the data series. |
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
202 */ |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
203 protected void doCrossSectionWaterLineOut( |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
204 Object o, |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
205 String seriesName, |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
206 Document theme, |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
207 boolean visible |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
208 ) { |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
209 logger.debug("CrossSectionGenerator.doCrossSectionWaterLineOut"); |
1141
bcba246d9c03
Fix various issues like i18n in cross section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1125
diff
changeset
|
210 |
1741
1bc926b5b435
Fix for flys/issue316
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1697
diff
changeset
|
211 // DO NOT SORT DATA! This destroys the gaps indicated by NaNs |
1bc926b5b435
Fix for flys/issue316
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1697
diff
changeset
|
212 XYSeries series = new StyledXYSeries(seriesName, false, theme); |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
213 |
1791
e0e5a5b51a40
Added new StyledSeriesBuilder class and use it when adding points to XYSeries (in diagram generation).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1741
diff
changeset
|
214 StyledSeriesBuilder.addPoints(series, (double [][]) o); |
e0e5a5b51a40
Added new StyledSeriesBuilder class and use it when adding points to XYSeries (in diagram generation).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1741
diff
changeset
|
215 |
1931
7c52e9cb2a72
Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1791
diff
changeset
|
216 addAxisSeries(series, 0, visible); |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
217 } |
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
218 |
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
219 |
2138
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
220 /** Add HYK-Annotations (colorize and label some areas, draw lines. */ |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
221 protected void doHyk( |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
222 Object o, |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
223 String seriesName, |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
224 Document theme, |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
225 boolean visible |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
226 ) { |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
227 logger.debug("CrossSectionGenerator.doHyk"); |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
228 |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
229 // TODO there is some style information for the text at least. |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
230 |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
231 List<HYKFactory.Zone> zones = (List<HYKFactory.Zone>) o; |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
232 |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
233 if (zones.size() == 0) { |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
234 logger.debug("CrossSectionGenerator.doHYK: empty zone list received."); |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
235 } |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
236 |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
237 //TODO handle visible |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
238 |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
239 addAnnotations(new FLYSAnnotation("HYK Zones", null, zones), true); |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
240 } |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
241 |
59bb5c895be3
Improved HYK/Zones- handling.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2126
diff
changeset
|
242 |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
243 /** |
1116
05e4ef0f9489
Improved stub for CrossSections (including Factory and Facet).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1113
diff
changeset
|
244 * Do cross sections out. |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
245 * |
1141
bcba246d9c03
Fix various issues like i18n in cross section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1125
diff
changeset
|
246 * @param seriesName name of the data (line) to display in legend. |
1116
05e4ef0f9489
Improved stub for CrossSections (including Factory and Facet).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1113
diff
changeset
|
247 * @param theme Theme for the data series. |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
248 */ |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
249 protected void doCrossSectionOut( |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
250 Object o, |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
251 String seriesName, |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
252 Document theme, |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
253 boolean visible |
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1158
diff
changeset
|
254 ) { |
1116
05e4ef0f9489
Improved stub for CrossSections (including Factory and Facet).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1113
diff
changeset
|
255 logger.debug("CrossSectionGenerator.doCrossSectionOut"); |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
256 |
1141
bcba246d9c03
Fix various issues like i18n in cross section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1125
diff
changeset
|
257 XYSeries series = new StyledXYSeries(seriesName, theme); |
1122
111794adf285
Get real (but yet not parameterized) data to display in CrossSection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1116
diff
changeset
|
258 |
1791
e0e5a5b51a40
Added new StyledSeriesBuilder class and use it when adding points to XYSeries (in diagram generation).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1741
diff
changeset
|
259 StyledSeriesBuilder.addPoints(series, (double [][]) o); |
e0e5a5b51a40
Added new StyledSeriesBuilder class and use it when adding points to XYSeries (in diagram generation).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1741
diff
changeset
|
260 |
1931
7c52e9cb2a72
Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1791
diff
changeset
|
261 addAxisSeries(series, 0, visible); |
1111
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
262 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
263 } |
b96ce07ba56c
Added dummy sceleton for Cross Sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
264 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |