Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java @ 3409:97ad960f5579
Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
flys-artifacts/trunk@5062 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Thu, 19 Jul 2012 12:59:56 +0000 |
parents | 5642a83420f2 |
children | 3dc26ec2558d |
comparison
equal
deleted
inserted
replaced
3408:50d61a2494cb | 3409:97ad960f5579 |
---|---|
1 package de.intevation.flys.exports; | 1 package de.intevation.flys.exports; |
2 | |
3 import org.apache.log4j.Logger; | |
4 | |
5 import org.jfree.chart.title.TextTitle; | |
6 | |
7 import org.jfree.chart.JFreeChart; | |
8 import org.jfree.chart.plot.XYPlot; | |
9 | 2 |
10 import de.intevation.flys.artifacts.model.FacetTypes; | 3 import de.intevation.flys.artifacts.model.FacetTypes; |
11 import de.intevation.flys.artifacts.model.WKms; | 4 import de.intevation.flys.artifacts.model.WKms; |
5 | |
6 import org.apache.log4j.Logger; | |
7 import org.jfree.chart.JFreeChart; | |
8 import org.jfree.chart.plot.XYPlot; | |
12 | 9 |
13 | 10 |
14 /** | 11 /** |
15 * An OutGenerator that generates w differences curves. | 12 * An OutGenerator that generates w differences curves. |
16 */ | 13 */ |
84 return I18N_WDIFF_SUBTITLE; | 81 return I18N_WDIFF_SUBTITLE; |
85 } | 82 } |
86 | 83 |
87 | 84 |
88 /** | 85 /** |
89 * Add (internationalized) subtitle to chart. | |
90 * Overridden to avoid trying to access the range of masterartifact. | |
91 * @see getChartSubtitleKey | |
92 */ | |
93 @Override | |
94 protected void addSubtitles(JFreeChart chart) { | |
95 String subtitle = getChartSubtitle(); | |
96 | |
97 if (subtitle != null && subtitle.length() > 0) { | |
98 chart.addSubtitle(new TextTitle(subtitle)); | |
99 } | |
100 } | |
101 | |
102 | |
103 /** | |
104 * | 86 * |
105 */ | 87 */ |
106 @Override | 88 @Override |
107 public JFreeChart generateChart() { | 89 public JFreeChart generateChart() { |
108 JFreeChart chart = super.generateChart(); | 90 JFreeChart chart = super.generateChart(); |