comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.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 52b6de9d0ab4
children 0385bcc4229a
comparison
equal deleted inserted replaced
407:9eb5f0c8fe7f 408:fc3ac59c3c8b
32 /** The logger used in this generator.*/ 32 /** The logger used in this generator.*/
33 private static Logger logger = 33 private static Logger logger =
34 Logger.getLogger(DischargeCurveGenerator.class); 34 Logger.getLogger(DischargeCurveGenerator.class);
35 35
36 36
37 public static final String I18N_CHART_TITLE =
38 "chart.discharge.curve.title";
39
40 public static final String I18N_XAXIS_LABEL =
41 "chart.discharge.curve.xaxis.label";
42
43 public static final String I18N_YAXIS_LABEL =
44 "chart.discharge.curve.yaxis.label";
45
46 public static final String I18N_CHART_TITLE_DEFAULT = "Abflusskurven";
47 public static final String I18N_XAXIS_LABEL_DEFAULT = "Q [m³/s]";
48 public static final String I18N_YAXIS_LABEL_DEFAULT = "W [cm]";
49
50
37 /** The Dataset that contains the data for the chart.*/ 51 /** The Dataset that contains the data for the chart.*/
38 protected DefaultXYDataset dataset; 52 protected DefaultXYDataset dataset;
39 53
40 54
41 public DischargeCurveGenerator() { 55 public DischargeCurveGenerator() {
44 this.dataset = new DefaultXYDataset(); 58 this.dataset = new DefaultXYDataset();
45 } 59 }
46 60
47 61
48 protected String getChartTitle() { 62 protected String getChartTitle() {
49 return "Abflusskurven"; 63 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT);
50 } 64 }
51 65
52 66
53 protected String getXAxisLabel() { 67 protected String getXAxisLabel() {
54 return "Q[m³/s]"; 68 return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT);
55 } 69 }
56 70
57 71
58 protected String getYAxisLabel() { 72 protected String getYAxisLabel() {
59 return "W[cm]"; 73 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT);
60 } 74 }
61 75
62 76
63 protected void addDatasets(JFreeChart chart) { 77 protected void addDatasets(JFreeChart chart) {
64 XYPlot plot = (XYPlot) chart.getPlot(); 78 XYPlot plot = (XYPlot) chart.getPlot();

http://dive4elements.wald.intevation.org