comparison flys-artifacts/src/main/java/de/intevation/flys/exports/WDifferencesCurveGenerator.java @ 1755:f7072039ad84

Added default diff theme, avoid possible NPE. flys-artifacts/trunk@3058 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 24 Oct 2011 09:50:11 +0000
parents 4ae7df2a74ed
children 205eb6f124a5
comparison
equal deleted inserted replaced
1754:8e6615ad60b8 1755:f7072039ad84
58 public final static String I18N_WDIFF_YAXIS_LABEL_DEFAULT = "m"; 58 public final static String I18N_WDIFF_YAXIS_LABEL_DEFAULT = "m";
59 59
60 60
61 /** 61 /**
62 * Get internationalized title for chart. 62 * Get internationalized title for chart.
63 */ 63 * @return internationalized Chart title.
64 */
65 @Override
64 public String getChartTitle() { 66 public String getChartTitle() {
65 return msg(I18N_WDIFF_TITLE, I18N_WDIFF_TITLE_DEFAULT); 67 return msg(I18N_WDIFF_TITLE, I18N_WDIFF_TITLE_DEFAULT);
66 } 68 }
67 69
68 70
69 /** 71 /**
70 * Get default value for the second Y-Axis' label (if no translation was 72 * Get default value for the second Y-Axis' label (if no translation was
71 * found). 73 * found).
74 * @return default value for second y-axis label.
72 */ 75 */
73 @Override 76 @Override
74 protected String get2YAxisDefaultLabel() { 77 protected String get2YAxisDefaultLabel() {
75 return I18N_WDIFF_2YAXIS_LABEL_DEFAULT; 78 return I18N_WDIFF_2YAXIS_LABEL_DEFAULT;
76 } 79 }
77 80
78 81
79
80 /** 82 /**
81 * Gets key to look up internationalized String for the charts subtitle. 83 * Gets key to look up internationalized String for the charts subtitle.
82 * @return key to look up translated subtitle. 84 * @return key to look up translated subtitle.
83 */ 85 */
84 @Override 86 @Override
87 } 89 }
88 90
89 91
90 /** 92 /**
91 * Get key for internationalization of the second Y-Axis' label. 93 * Get key for internationalization of the second Y-Axis' label.
94 * @return internationalized second y-axis.
92 */ 95 */
93 @Override 96 @Override
94 protected String get2YAxisLabelKey() { 97 protected String get2YAxisLabelKey() {
95 return I18N_WDIFF_2YAXIS_LABEL; 98 return I18N_WDIFF_2YAXIS_LABEL;
96 } 99 }
97 100
98 101
99 /** 102 /**
100 * Get internationalized label for the y axis. 103 * Get internationalized label for the y axis.
104 * @return internationalized label for y axos.
101 */ 105 */
102 @Override 106 @Override
103 protected String getYAxisLabel() { 107 protected String getYAxisLabel() {
104 FLYSArtifact flys = (FLYSArtifact) master; 108 FLYSArtifact flys = (FLYSArtifact) master;
105 109
249 } 253 }
250 } 254 }
251 255
252 /** 256 /**
253 * Disable Longitudinals behaviour to include "0" in the Q axis. 257 * Disable Longitudinals behaviour to include "0" in the Q axis.
258 *
254 * @param range range with which to look up upper bound. 259 * @param range range with which to look up upper bound.
255 * @return range to be used for "auto-scaling" axis. 260 * @return range to be used for "auto-scaling" axis.
256 */ 261 */
257 @Override 262 @Override
258 protected Range createSecondAxisRange(Range range) { 263 protected Range createSecondAxisRange(Range range) {
259 return new Range(range.getLowerBound(), range.getUpperBound()); 264 if (range == null) {
265 return range;
266 }
267 return new Range(range.getLowerBound(), range.getUpperBound());
260 } 268 }
261 269
262 270
263 /** 271 /**
264 * 272 *

http://dive4elements.wald.intevation.org