Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java @ 728:56bcf56b1fe0
#157 Both types of discharge curves will now include the '0' value on the x-axis.
flys-artifacts/trunk@2218 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 23 Jun 2011 13:42:47 +0000 |
parents | f3fd8c9b7f51 |
children | 39d191f011dc |
comparison
equal
deleted
inserted
replaced
727:11e9489eb1a7 | 728:56bcf56b1fe0 |
---|---|
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.plot.XYPlot; |
10 import org.jfree.chart.title.TextTitle; | 9 import org.jfree.chart.title.TextTitle; |
11 import org.jfree.data.Range; | |
12 | 10 |
13 import de.intevation.artifacts.Artifact; | 11 import de.intevation.artifacts.Artifact; |
14 | 12 |
15 import de.intevation.artifactdatabase.state.Facet; | 13 import de.intevation.artifactdatabase.state.Facet; |
16 | 14 |
71 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); | 69 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); |
72 } | 70 } |
73 | 71 |
74 | 72 |
75 @Override | 73 @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 | |
88 public void doOut(Artifact artifact, Facet facet, Document attr) { | 74 public void doOut(Artifact artifact, Facet facet, Document attr) { |
89 String name = facet != null ? facet.getName() : null; | 75 String name = facet != null ? facet.getName() : null; |
90 | 76 |
91 logger.debug("ComputedDischargeCurveGenerator.doOut: " + name); | 77 logger.debug("ComputedDischargeCurveGenerator.doOut: " + name); |
92 | 78 |