Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java @ 718:f3fd8c9b7f51
#157 Computed discharge curve charts always have a lower bound set to 0.
flys-artifacts/trunk@2192 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 21 Jun 2011 18:10:49 +0000 |
parents | 708b270dfd30 |
children | 56bcf56b1fe0 |
comparison
equal
deleted
inserted
replaced
717:be4709640aac | 718:f3fd8c9b7f51 |
---|---|
3 import org.apache.log4j.Logger; | 3 import org.apache.log4j.Logger; |
4 | 4 |
5 import org.w3c.dom.Document; | 5 import org.w3c.dom.Document; |
6 | 6 |
7 import org.jfree.chart.JFreeChart; | 7 import org.jfree.chart.JFreeChart; |
8 import org.jfree.chart.axis.ValueAxis; | |
9 import org.jfree.chart.plot.XYPlot; | |
8 import org.jfree.chart.title.TextTitle; | 10 import org.jfree.chart.title.TextTitle; |
11 import org.jfree.data.Range; | |
9 | 12 |
10 import de.intevation.artifacts.Artifact; | 13 import de.intevation.artifacts.Artifact; |
11 | 14 |
12 import de.intevation.artifactdatabase.state.Facet; | 15 import de.intevation.artifactdatabase.state.Facet; |
13 | 16 |
68 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); | 71 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); |
69 } | 72 } |
70 | 73 |
71 | 74 |
72 @Override | 75 @Override |
76 protected boolean zoomX(XYPlot plot, ValueAxis axis, Range range, Range x) { | |
77 boolean zoomin = super.zoom(plot, axis, range, x); | |
78 | |
79 if (!zoomin) { | |
80 axis.setLowerBound(0d); | |
81 } | |
82 | |
83 return zoomin; | |
84 } | |
85 | |
86 | |
87 @Override | |
73 public void doOut(Artifact artifact, Facet facet, Document attr) { | 88 public void doOut(Artifact artifact, Facet facet, Document attr) { |
74 String name = facet != null ? facet.getName() : null; | 89 String name = facet != null ? facet.getName() : null; |
75 | 90 |
76 logger.debug("ComputedDischargeCurveGenerator.doOut: " + name); | 91 logger.debug("ComputedDischargeCurveGenerator.doOut: " + name); |
77 | 92 |