Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 2047:0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
flys-artifacts/trunk@3535 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 23 Dec 2011 08:57:25 +0000 |
parents | 8e7e56db96a5 |
children | 3157a78e6494 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Fri Dec 23 08:51:28 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Fri Dec 23 08:57:25 2011 +0000 @@ -125,15 +125,35 @@ /** - * Get internationalized title for chart. + * Returns a title for the chart from ChartSettings object + * if this object is not null or creates a default title. + * + * @return a title. */ + @Override public String getChartTitle() { + ChartSettings chartSettings = getChartSettings(); + if (chartSettings != null) { + return getChartTitle(chartSettings); + } + return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT); } + /** + * Returns a subtitle for the chart from ChartSettings object + * if this object is not null or creates a default title. + * + * @return a title. + */ @Override protected String getChartSubtitle() { + ChartSettings chartSettings = getChartSettings(); + if (chartSettings != null) { + return getChartSubtitle(chartSettings); + } + double[] dist = getRange(); Object[] args = new Object[] {