Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java @ 2048:3157a78e6494
Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
flys-artifacts/trunk@3538 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 23 Dec 2011 14:24:57 +0000 |
parents | e71719483546 |
children | 5642a83420f2 |
comparison
equal
deleted
inserted
replaced
2047:0318fa6f0844 | 2048:3157a78e6494 |
---|---|
62 /** | 62 /** |
63 * Get internationalized title for chart. | 63 * Get internationalized title for chart. |
64 * @return internationalized Chart title. | 64 * @return internationalized Chart title. |
65 */ | 65 */ |
66 @Override | 66 @Override |
67 public String getChartTitle() { | 67 public String getDefaultChartTitle() { |
68 return msg(I18N_WDIFF_TITLE, I18N_WDIFF_TITLE_DEFAULT); | 68 return msg(I18N_WDIFF_TITLE, I18N_WDIFF_TITLE_DEFAULT); |
69 } | 69 } |
70 | 70 |
71 | 71 |
72 @Override | 72 @Override |
73 protected String getChartSubtitle() { | 73 protected String getDefaultChartSubtitle() { |
74 return getRiverName(); | 74 return getRiverName(); |
75 } | 75 } |
76 | 76 |
77 | 77 |
78 /** | 78 /** |
91 * @see getChartSubtitleKey | 91 * @see getChartSubtitleKey |
92 */ | 92 */ |
93 @Override | 93 @Override |
94 protected void addSubtitles(JFreeChart chart) { | 94 protected void addSubtitles(JFreeChart chart) { |
95 String subtitle = getChartSubtitle(); | 95 String subtitle = getChartSubtitle(); |
96 chart.addSubtitle(new TextTitle(subtitle)); | 96 |
97 if (subtitle != null && subtitle.length() > 0) { | |
98 chart.addSubtitle(new TextTitle(subtitle)); | |
99 } | |
97 } | 100 } |
98 | 101 |
99 | 102 |
100 /** | 103 /** |
101 * | 104 * |