Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 2159:ebfca80dae09
Added short subtitle for longitudinal section chart.
flys-artifacts/trunk@3745 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 20 Jan 2012 16:24:39 +0000 |
parents | ce9b15673f3f |
children | 3f90f4d37c8d |
comparison
equal
deleted
inserted
replaced
2158:1ea555bf3c6b | 2159:ebfca80dae09 |
---|---|
69 * subtitles. | 69 * subtitles. |
70 */ | 70 */ |
71 public static final String I18N_CHART_SUBTITLE = | 71 public static final String I18N_CHART_SUBTITLE = |
72 "chart.longitudinal.section.subtitle"; | 72 "chart.longitudinal.section.subtitle"; |
73 | 73 |
74 /** | |
75 * Key to look up internationalized String for LongitudinalSection diagrams | |
76 * short subtitles. | |
77 */ | |
78 public static final String I18N_CHART_SHORT_SUBTITLE = | |
79 "chart.longitudinal.section.shortsubtitle"; | |
80 | |
74 public static final String I18N_XAXIS_LABEL = | 81 public static final String I18N_XAXIS_LABEL = |
75 "chart.longitudinal.section.xaxis.label"; | 82 "chart.longitudinal.section.xaxis.label"; |
76 | 83 |
77 public static final String I18N_YAXIS_LABEL = | 84 public static final String I18N_YAXIS_LABEL = |
78 "chart.longitudinal.section.yaxis.label"; | 85 "chart.longitudinal.section.yaxis.label"; |
147 double[] dist = getRange(); | 154 double[] dist = getRange(); |
148 | 155 |
149 Object[] args = null; | 156 Object[] args = null; |
150 if (dist == null) { | 157 if (dist == null) { |
151 args = new Object[] {getRiverName()}; | 158 args = new Object[] {getRiverName()}; |
152 } | 159 return msg(getChartShortSubtitleKey(), "", args); |
153 else { | 160 } |
154 args = new Object[] { | 161 args = new Object[] { |
155 getRiverName(), | 162 getRiverName(), |
156 dist[0], | 163 dist[0], |
157 dist[1] | 164 dist[1] |
158 }; | 165 }; |
159 } | |
160 return msg(getChartSubtitleKey(), "", args); | 166 return msg(getChartSubtitleKey(), "", args); |
161 } | 167 } |
162 | 168 |
163 | 169 |
164 /** | 170 /** |
165 * Gets key to look up internationalized String for the charts subtitle. | 171 * Gets key to look up internationalized String for the charts subtitle. |
166 * @return key to look up translated subtitle. | 172 * @return key to look up translated subtitle. |
167 */ | 173 */ |
168 protected String getChartSubtitleKey() { | 174 protected String getChartSubtitleKey() { |
169 return I18N_CHART_SUBTITLE; | 175 return I18N_CHART_SUBTITLE; |
176 } | |
177 | |
178 | |
179 /** | |
180 * Gets key to look up internationalized String for the charts short | |
181 * subtitle. | |
182 * @return key to look up translated subtitle. | |
183 */ | |
184 protected String getChartShortSubtitleKey() { | |
185 return I18N_CHART_SHORT_SUBTITLE; | |
170 } | 186 } |
171 | 187 |
172 | 188 |
173 /** | 189 /** |
174 * Add (internationalized) subtitle to chart. | 190 * Add (internationalized) subtitle to chart. |