Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 1989:156304542edf
Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
flys-artifacts/trunk@3423 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 15 Dec 2011 12:05:06 +0000 |
parents | 590d9bc88ff5 |
children | 0bd7c3cf0af1 |
comparison
equal
deleted
inserted
replaced
1988:158b3aabda2c | 1989:156304542edf |
---|---|
113 public String getChartTitle() { | 113 public String getChartTitle() { |
114 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT); | 114 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT); |
115 } | 115 } |
116 | 116 |
117 | 117 |
118 @Override | |
119 protected String getChartSubtitle() { | |
120 double[] dist = getRange(); | |
121 | |
122 Object[] args = new Object[] { | |
123 getRiverName(), | |
124 | |
125 dist[0], | |
126 | |
127 dist[1] | |
128 }; | |
129 | |
130 return msg(getChartSubtitleKey(), "", args); | |
131 } | |
132 | |
133 | |
118 /** | 134 /** |
119 * Gets key to look up internationalized String for the charts subtitle. | 135 * Gets key to look up internationalized String for the charts subtitle. |
120 * @return key to look up translated subtitle. | 136 * @return key to look up translated subtitle. |
121 */ | 137 */ |
122 protected String getChartSubtitleKey() { | 138 protected String getChartSubtitleKey() { |
128 * Add (internationalized) subtitle to chart. | 144 * Add (internationalized) subtitle to chart. |
129 * @see getChartSubtitleKey | 145 * @see getChartSubtitleKey |
130 */ | 146 */ |
131 @Override | 147 @Override |
132 protected void addSubtitles(JFreeChart chart) { | 148 protected void addSubtitles(JFreeChart chart) { |
133 double[] dist = getRange(); | 149 String subtitle = getChartSubtitle(); |
134 | |
135 Object[] args = new Object[] { | |
136 getRiverName(), | |
137 | |
138 dist[0], | |
139 | |
140 dist[1] | |
141 }; | |
142 | |
143 String subtitle = msg(getChartSubtitleKey(), "", args); | |
144 chart.addSubtitle(new TextTitle(subtitle)); | 150 chart.addSubtitle(new TextTitle(subtitle)); |
145 } | 151 } |
146 | 152 |
147 | 153 |
148 /** | 154 /** |