Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveGenerator.java @ 2550:a992ab2588a8
#509 Set the lower bounds of duration curves Q axis to 0 if no zoom has taken place.
flys-artifacts/trunk@4061 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 16 Feb 2012 12:15:11 +0000 |
parents | 1fcaeced48f2 |
children | bece6f604899 |
comparison
equal
deleted
inserted
replaced
2549:75146a1261c4 | 2550:a992ab2588a8 |
---|---|
159 | 159 |
160 return zoomin; | 160 return zoomin; |
161 } | 161 } |
162 | 162 |
163 | 163 |
164 /** | |
165 * This method overrides the method in the parent class to set the lower | |
166 * bounds of the Q axis to 0. This axis should never display negative | |
167 * values on its own. | |
168 */ | |
169 @Override | |
170 protected boolean zoomY(XYPlot plot, ValueAxis axis, Range range, Range x) { | |
171 boolean zoomin = super.zoom(plot, axis, range, x); | |
172 | |
173 if (!zoomin && axis instanceof IdentifiableNumberAxis) { | |
174 String id = ((IdentifiableNumberAxis) axis).getId(); | |
175 | |
176 if (YAXIS.Q.toString().equals(id)) { | |
177 axis.setLowerBound(0d); | |
178 } | |
179 } | |
180 | |
181 return zoomin; | |
182 } | |
183 | |
184 | |
164 @Override | 185 @Override |
165 public void doOut( | 186 public void doOut( |
166 ArtifactAndFacet artifactFacet, | 187 ArtifactAndFacet artifactFacet, |
167 Document attr, | 188 Document attr, |
168 boolean visible | 189 boolean visible |