comparison flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java @ 3466:8160e62bbb3a

Registered new output 'fix_vollmer_wq_curve' for the vollmer path of fixings analysis module; create required Facets for it after calculation. flys-artifacts/trunk@5137 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 26 Jul 2012 11:47:04 +0000
parents f382127df48e
children e7f1556192b3
comparison
equal deleted inserted replaced
3465:7d0ebde8c3e3 3466:8160e62bbb3a
219 @Override 219 @Override
220 protected String getDefaultChartSubtitle() { 220 protected String getDefaultChartSubtitle() {
221 FixAnalysisAccess access = new FixAnalysisAccess(artifact); 221 FixAnalysisAccess access = new FixAnalysisAccess(artifact);
222 DateRange dateRange = access.getDateRange(); 222 DateRange dateRange = access.getDateRange();
223 DateRange refRange = access.getReferencePeriod(); 223 DateRange refRange = access.getReferencePeriod();
224 return Resources.format( 224
225 context.getMeta(), 225 if (dateRange != null && refRange != null) {
226 I18N_CHART_SUBTITLE, 226 return Resources.format(
227 "", 227 context.getMeta(),
228 access.getRiver(), 228 I18N_CHART_SUBTITLE,
229 dateRange.getFrom(), 229 "",
230 dateRange.getTo(), 230 access.getRiver(),
231 refRange.getFrom(), 231 dateRange.getFrom(),
232 refRange.getTo()); 232 dateRange.getTo(),
233 refRange.getFrom(),
234 refRange.getTo());
235 }
236
237 return null;
233 } 238 }
234 239
235 @Override 240 @Override
236 protected void addSubtitles(JFreeChart chart) { 241 protected void addSubtitles(JFreeChart chart) {
237 chart.addSubtitle(new TextTitle(getDefaultChartSubtitle())); 242 String defaultSubtitle = getDefaultChartSubtitle();
243
244 if (defaultSubtitle == null || defaultSubtitle.length() == 0) {
245 return;
246 }
247
248 chart.addSubtitle(new TextTitle(defaultSubtitle));
249
238 StringBuilder buf = new StringBuilder(); 250 StringBuilder buf = new StringBuilder();
239 251
240 // Add analysis periods as additional subtitle 252 // Add analysis periods as additional subtitle
241 FixAnalysisAccess access = new FixAnalysisAccess(artifact); 253 FixAnalysisAccess access = new FixAnalysisAccess(artifact);
242 DateRange[] aperiods = access.getAnalysisPeriods(); 254 DateRange[] aperiods = access.getAnalysisPeriods();

http://dive4elements.wald.intevation.org