Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java @ 2051:4ba5036109d2
Make use of user defined axes labels during chart creation.
flys-artifacts/trunk@3541 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 27 Dec 2011 07:52:25 +0000 |
parents | 2d5f2bc68cc6 |
children | a026d005accd |
comparison
equal
deleted
inserted
replaced
2050:c4e0e433f825 | 2051:4ba5036109d2 |
---|---|
98 @Override | 98 @Override |
99 protected void addSubtitles(JFreeChart chart) { | 99 protected void addSubtitles(JFreeChart chart) { |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 /** | 103 @Override |
104 * i18n-Label for X-Axis. | 104 protected String getDefaultXAxisLabel() { |
105 */ | |
106 protected String getXAxisLabel() { | |
107 return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT); | 105 return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT); |
108 } | 106 } |
109 | 107 |
110 /** | 108 @Override |
111 * i18n-Label for X-Axis (W). | 109 protected String getDefaultYAxisLabel(int pos) { |
112 */ | |
113 protected String getYAxisLabel() { | |
114 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); | 110 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); |
115 } | 111 } |
116 | 112 |
117 | 113 |
118 @Override | 114 @Override |
134 @Override | 130 @Override |
135 protected NumberAxis createYAxis(int index) { | 131 protected NumberAxis createYAxis(int index) { |
136 Font labelFont = new Font("Tahoma", Font.BOLD, 14); | 132 Font labelFont = new Font("Tahoma", Font.BOLD, 14); |
137 String label = "default"; | 133 String label = "default"; |
138 if (index == YAXIS.W.idx) { | 134 if (index == YAXIS.W.idx) { |
139 label = getYAxisLabel(); | 135 label = getYAxisLabel(0); |
140 } | 136 } |
141 NumberAxis axis = createNumberAxis(index, label); | 137 NumberAxis axis = createNumberAxis(index, label); |
142 axis.setLabelFont(labelFont); | 138 axis.setLabelFont(labelFont); |
143 axis.setAutoRangeIncludesZero(false); | 139 axis.setAutoRangeIncludesZero(false); |
144 return axis; | 140 return axis; |