Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java @ 408:fc3ac59c3c8b
Enabled i18n support for charts.
flys-artifacts/trunk@1865 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 09 May 2011 12:53:49 +0000 |
parents | 478940d06876 |
children | 0385bcc4229a |
comparison
equal
deleted
inserted
replaced
407:9eb5f0c8fe7f | 408:fc3ac59c3c8b |
---|---|
37 "duration_curve.w"; | 37 "duration_curve.w"; |
38 | 38 |
39 public static final String DURATION_CURVE_Q = | 39 public static final String DURATION_CURVE_Q = |
40 "duration_curve.q"; | 40 "duration_curve.q"; |
41 | 41 |
42 public static final String I18N_CHART_TITLE = | |
43 "chart.duration.curve.title"; | |
44 | |
45 public static final String I18N_XAXIS_LABEL = | |
46 "chart.duration.curve.xaxis.label"; | |
47 | |
48 public static final String I18N_YAXIS_LABEL = | |
49 "chart.duration.curve.yaxis.label"; | |
50 | |
51 public static final String I18N_CHART_TITLE_DEFAULT = | |
52 "Dauerlinie"; | |
53 | |
54 public static final String I18N_XAXIS_LABEL_DEFAULT = | |
55 "Unterschreitungsdauer [Tage]"; | |
56 | |
57 public static final String I18N_YAXIS_LABEL_DEFAULT = | |
58 "W [NN + m]"; | |
59 | |
42 | 60 |
43 public DurationCurveGenerator() { | 61 public DurationCurveGenerator() { |
44 super(); | 62 super(); |
45 | 63 |
46 this.w = new XYSeriesCollection(); | 64 this.w = new XYSeriesCollection(); |
47 this.q = new XYSeriesCollection(); | 65 this.q = new XYSeriesCollection(); |
48 } | 66 } |
49 | 67 |
50 | 68 |
51 protected String getChartTitle() { | 69 protected String getChartTitle() { |
52 // TODO i18n | 70 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT); |
53 return "Wasserstand für Gewässer"; | |
54 } | 71 } |
55 | 72 |
56 | 73 |
57 protected String getXAxisLabel() { | 74 protected String getXAxisLabel() { |
58 // TODO i18n | 75 return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT); |
59 return "Unterschreitungsdauer [Tagen]"; | |
60 } | 76 } |
61 | 77 |
62 | 78 |
63 protected String getYAxisLabel() { | 79 protected String getYAxisLabel() { |
64 return "W [NN + m]"; | 80 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); |
65 } | 81 } |
66 | 82 |
67 | 83 |
68 public void addDatasets(JFreeChart chart) { | 84 public void addDatasets(JFreeChart chart) { |
69 XYPlot plot = (XYPlot) chart.getPlot(); | 85 XYPlot plot = (XYPlot) chart.getPlot(); |