comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.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 156304542edf
children 4ba5036109d2
comparison
equal deleted inserted replaced
2047:0318fa6f0844 2048:3157a78e6494
56 super(); 56 super();
57 } 57 }
58 58
59 59
60 @Override 60 @Override
61 protected String getChartTitle() { 61 protected String getDefaultChartTitle() {
62 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT); 62 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT);
63 } 63 }
64 64
65 65
66 @Override 66 @Override
67 protected String getChartSubtitle() { 67 protected String getDefaultChartSubtitle() {
68 double[] dist = getRange(); 68 double[] dist = getRange();
69 69
70 Object[] args = new Object[] { 70 Object[] args = new Object[] {
71 getRiverName(), 71 getRiverName(),
72 dist[0] 72 dist[0]
77 77
78 78
79 @Override 79 @Override
80 protected void addSubtitles(JFreeChart chart) { 80 protected void addSubtitles(JFreeChart chart) {
81 String subtitle = getChartSubtitle(); 81 String subtitle = getChartSubtitle();
82 chart.addSubtitle(new TextTitle(subtitle)); 82
83 if (subtitle != null && subtitle.length() > 0) {
84 chart.addSubtitle(new TextTitle(subtitle));
85 }
83 } 86 }
84 87
85 88
86 @Override 89 @Override
87 protected String getYAxisLabel() { 90 protected String getYAxisLabel() {

http://dive4elements.wald.intevation.org