Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightGenerator.java @ 6927:0288db5e90d5
issue1455: Extract QOutProcessor, use it
in MiddleBedHeightGenerator and LongitudinalSectionGenerator.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 27 Aug 2013 12:46:11 +0200 |
parents | bf191baa37e7 |
children | e0311aa32efb |
comparison
equal
deleted
inserted
replaced
6926:bf191baa37e7 | 6927:0288db5e90d5 |
---|---|
16 import org.dive4elements.river.artifacts.model.MiddleBedHeightData; | 16 import org.dive4elements.river.artifacts.model.MiddleBedHeightData; |
17 import org.dive4elements.river.artifacts.model.WQKms; | 17 import org.dive4elements.river.artifacts.model.WQKms; |
18 | 18 |
19 import org.dive4elements.river.exports.process.BedheightProcessor; | 19 import org.dive4elements.river.exports.process.BedheightProcessor; |
20 import org.dive4elements.river.exports.process.Processor; | 20 import org.dive4elements.river.exports.process.Processor; |
21 import org.dive4elements.river.exports.process.QOutProcessor; | |
21 import org.dive4elements.river.exports.process.WOutProcessor; | 22 import org.dive4elements.river.exports.process.WOutProcessor; |
22 import org.dive4elements.river.jfree.RiverAnnotation; | 23 import org.dive4elements.river.jfree.RiverAnnotation; |
23 import org.dive4elements.river.jfree.StyledXYSeries; | 24 import org.dive4elements.river.jfree.StyledXYSeries; |
24 import org.dive4elements.river.themes.ThemeDocument; | 25 import org.dive4elements.river.themes.ThemeDocument; |
25 import org.dive4elements.river.utils.RiverUtils; | 26 import org.dive4elements.river.utils.RiverUtils; |
143 new Object[] { unit }); | 144 new Object[] { unit }); |
144 } | 145 } |
145 else if (index == YAXIS.P.idx) { | 146 else if (index == YAXIS.P.idx) { |
146 label = msg(I18N_P_YAXIS_LABEL, I18N_P_YAXIS_LABEL_DEFAULT); | 147 label = msg(I18N_P_YAXIS_LABEL, I18N_P_YAXIS_LABEL_DEFAULT); |
147 } | 148 } |
148 else if (index = YAXIS.Q.idx) { | 149 else if (index == YAXIS.Q.idx) { |
149 label = msg(I18N_Q_YAXIS_LABEL, I18N_Q_YAXIS_LABEL_DEFAULT); | 150 label = msg(I18N_Q_YAXIS_LABEL, I18N_Q_YAXIS_LABEL_DEFAULT); |
150 } | 151 } |
151 | 152 |
152 return label; | 153 return label; |
153 } | 154 } |
193 return; | 194 return; |
194 } | 195 } |
195 | 196 |
196 Processor woutp = new WOutProcessor(); | 197 Processor woutp = new WOutProcessor(); |
197 Processor bedp = new BedheightProcessor(); | 198 Processor bedp = new BedheightProcessor(); |
198 WOutProcessor processor = new WOutProcessor(); | 199 Processor qoutp = new QOutProcessor(); |
199 if (processor.canHandle(name)) { | 200 if (woutp.canHandle(name)) { |
200 processor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx); | 201 woutp.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx); |
201 } | 202 } |
202 if (name.equals(MIDDLE_BED_HEIGHT_SINGLE) || name.equals(MIDDLE_BED_HEIGHT_EPOCH)) { | 203 else if (qoutp.canHandle(name)) { |
204 qoutp.doOut(this, artifactAndFacet, attr, visible, YAXIS.Q.idx); | |
205 } | |
206 else if (name.equals(MIDDLE_BED_HEIGHT_SINGLE) || name.equals(MIDDLE_BED_HEIGHT_EPOCH)) { | |
203 doHeightOut( | 207 doHeightOut( |
204 (MiddleBedHeightData) artifactAndFacet.getData(context), | 208 (MiddleBedHeightData) artifactAndFacet.getData(context), |
205 artifactAndFacet, | 209 artifactAndFacet, |
206 attr, | 210 attr, |
207 visible); | 211 visible); |