Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 4445:0eca080fc162
Move inverted from LongitudinalSectionGenerator to XYChartGenerator
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 07 Nov 2012 14:22:54 +0100 |
parents | 6772e9f9b65f |
children | 9425b7c51b73 |
comparison
equal
deleted
inserted
replaced
4444:47d50572844a | 4445:0eca080fc162 |
---|---|
88 public final static String I18N_WDIFF_YAXIS_LABEL = | 88 public final static String I18N_WDIFF_YAXIS_LABEL = |
89 "chart.w_differences.yaxis.label"; | 89 "chart.w_differences.yaxis.label"; |
90 | 90 |
91 public final static String I18N_WDIFF_YAXIS_LABEL_DEFAULT = "m"; | 91 public final static String I18N_WDIFF_YAXIS_LABEL_DEFAULT = "m"; |
92 | 92 |
93 /** Whether or not the plot is inverted (left-right). */ | |
94 protected boolean inverted; | |
95 | |
96 | |
97 public LongitudinalSectionGenerator() { | 93 public LongitudinalSectionGenerator() { |
98 super(); | 94 super(); |
99 } | 95 } |
100 | 96 |
101 | 97 |
113 return yaxes[idx].toString(); | 109 return yaxes[idx].toString(); |
114 } | 110 } |
115 }; | 111 }; |
116 } | 112 } |
117 | 113 |
118 | |
119 /** True if x axis has been inverted. */ | |
120 public boolean isInverted() { | |
121 return inverted; | |
122 } | |
123 | |
124 | |
125 /** Set to true if x axis has been inverted. */ | |
126 public void setInverted(boolean inverted) { | |
127 this.inverted = inverted; | |
128 } | |
129 | 114 |
130 /** | 115 /** |
131 * Return left most data points x value (on first axis). | 116 * Return left most data points x value (on first axis). |
132 * Overridden because axis could be inverted. | 117 * Overridden because axis could be inverted. |
133 */ | 118 */ |
306 * not inverted, otherwise it is. | 291 * not inverted, otherwise it is. |
307 * | 292 * |
308 * @param xaxis The domain axis. | 293 * @param xaxis The domain axis. |
309 */ | 294 */ |
310 protected void invertXAxis(ValueAxis xaxis) { | 295 protected void invertXAxis(ValueAxis xaxis) { |
311 if (inverted) { | 296 if (isInverted()) { |
312 logger.debug("X-Axis.setInverted(true)"); | 297 logger.debug("X-Axis.setInverted(true)"); |
313 xaxis.setInverted(true); | 298 xaxis.setInverted(true); |
314 } | 299 } |
315 } | 300 } |
316 | 301 |