Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java @ 2302:300d50f74dab
Handle manual points in discharge curve generator.
flys-artifacts/trunk@3970 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 08 Feb 2012 14:45:53 +0000 |
parents | a026d005accd |
children | 1fcaeced48f2 |
comparison
equal
deleted
inserted
replaced
2301:bc23341bf322 | 2302:300d50f74dab |
---|---|
24 import de.intevation.flys.artifacts.model.WQKms; | 24 import de.intevation.flys.artifacts.model.WQKms; |
25 | 25 |
26 import de.intevation.flys.utils.FLYSUtils; | 26 import de.intevation.flys.utils.FLYSUtils; |
27 import de.intevation.flys.jfree.FLYSAnnotation; | 27 import de.intevation.flys.jfree.FLYSAnnotation; |
28 import de.intevation.flys.jfree.StyledXYSeries; | 28 import de.intevation.flys.jfree.StyledXYSeries; |
29 | |
29 | 30 |
30 /** | 31 /** |
31 * An OutGenerator that generates discharge curves. | 32 * An OutGenerator that generates discharge curves. |
32 * | 33 * |
33 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 34 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
110 protected String getDefaultYAxisLabel(int pos) { | 111 protected String getDefaultYAxisLabel(int pos) { |
111 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); | 112 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT); |
112 } | 113 } |
113 | 114 |
114 | 115 |
116 /* TODO is this one really needed? */ | |
115 @Override | 117 @Override |
116 protected boolean zoomX(XYPlot plot, ValueAxis axis, Range range, Range x) { | 118 protected boolean zoomX(XYPlot plot, ValueAxis axis, Range range, Range x) { |
117 boolean zoomin = super.zoom(plot, axis, range, x); | 119 boolean zoomin = super.zoom(plot, axis, range, x); |
118 | 120 |
119 if (!zoomin) { | 121 if (!zoomin) { |
120 axis.setLowerBound(0d); | 122 axis.setLowerBound(0d); |
121 } | 123 } |
122 | 124 |
123 return zoomin; | 125 return zoomin; |
124 } | 126 } |
127 | |
125 | 128 |
126 /** | 129 /** |
127 * Create Y-Axis. | 130 * Create Y-Axis. |
128 * First Axis: W. | 131 * First Axis: W. |
129 * @return Y-Axis with label. | 132 * @return Y-Axis with label. |
164 || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) | 167 || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) |
165 || name.equals(MAINVALUES_W)) | 168 || name.equals(MAINVALUES_W)) |
166 { | 169 { |
167 doAnnotations((FLYSAnnotation) artifactFacet.getData(context), | 170 doAnnotations((FLYSAnnotation) artifactFacet.getData(context), |
168 artifactFacet.getFacet(), theme, visible); | 171 artifactFacet.getFacet(), theme, visible); |
172 } | |
173 else if (FacetTypes.IS.MANUALPOINTS(name)) { | |
174 doPoints(artifactFacet.getData(context), | |
175 artifactFacet.getFacetDescription(), | |
176 theme, visible, YAXIS.W.idx); | |
169 } | 177 } |
170 else { | 178 else { |
171 logger.warn("DischargeCurveGenerator.doOut: Unknown facet name: " + name); | 179 logger.warn("DischargeCurveGenerator.doOut: Unknown facet name: " + name); |
172 return; | 180 return; |
173 } | 181 } |