comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 1719:62983d0ced51

Fix missing annotations ('Streckenfavoriten') style. flys-artifacts/trunk@3000 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 18 Oct 2011 10:26:27 +0000
parents 7e19449d7826
children bbe12d77710d
comparison
equal deleted inserted replaced
1718:defe2cfeefa5 1719:62983d0ced51
4 4
5 import org.apache.log4j.Logger; 5 import org.apache.log4j.Logger;
6 6
7 import org.jfree.chart.JFreeChart; 7 import org.jfree.chart.JFreeChart;
8 import org.jfree.chart.axis.NumberAxis; 8 import org.jfree.chart.axis.NumberAxis;
9 import org.jfree.chart.title.TextTitle;
9 import org.jfree.chart.axis.ValueAxis; 10 import org.jfree.chart.axis.ValueAxis;
10 import org.jfree.chart.plot.XYPlot; 11 import org.jfree.chart.plot.XYPlot;
11 import org.jfree.chart.title.TextTitle;
12 import org.jfree.data.Range; 12 import org.jfree.data.Range;
13 import org.jfree.data.xy.XYSeries; 13 import org.jfree.data.xy.XYSeries;
14 14
15 import org.w3c.dom.Document; 15 import org.w3c.dom.Document;
16 16
115 * @see getChartSubtitleKey 115 * @see getChartSubtitleKey
116 */ 116 */
117 @Override 117 @Override
118 protected void addSubtitles(JFreeChart chart) { 118 protected void addSubtitles(JFreeChart chart) {
119 double[] dist = getRange(); 119 double[] dist = getRange();
120
120 Object[] args = new Object[] { 121 Object[] args = new Object[] {
121 getRiverName(), 122 getRiverName(),
123
122 dist[0], 124 dist[0],
125
123 dist[1] 126 dist[1]
124 }; 127 };
125 128
126 String subtitle = msg(getChartSubtitleKey(), "", args); 129 String subtitle = msg(getChartSubtitleKey(), "", args);
127 chart.addSubtitle(new TextTitle(subtitle)); 130 chart.addSubtitle(new TextTitle(subtitle));
263 } 266 }
264 else if (name.equals(LONGITUDINAL_Q)) { 267 else if (name.equals(LONGITUDINAL_Q)) {
265 doQOut((WQKms) f.getData(artifact, context), facet, attr, visible); 268 doQOut((WQKms) f.getData(artifact, context), facet, attr, visible);
266 } 269 }
267 else if (name.equals(LONGITUDINAL_ANNOTATION)) { 270 else if (name.equals(LONGITUDINAL_ANNOTATION)) {
268 doAnnotationsOut(f.getData(artifact, context), facet, attr,visible); 271 doAnnotationsOut(f.getData(artifact, context), facet, attr, visible);
269 } 272 }
270 else { 273 else {
271 logger.warn("Unknown facet name: " + name); 274 logger.warn("Unknown facet name: " + name);
272 return; 275 return;
273 } 276 }
291 boolean visible 294 boolean visible
292 ) { 295 ) {
293 logger.debug("LongitudinalSectionGenerator.doAnnotationsOut"); 296 logger.debug("LongitudinalSectionGenerator.doAnnotationsOut");
294 297
295 // Add all annotations in list o to our annotation pool. 298 // Add all annotations in list o to our annotation pool.
299 // TODO Duplicate in ComputedDischartgeCurveGenerator, merge
296 FLYSAnnotation fa = (FLYSAnnotation) o; 300 FLYSAnnotation fa = (FLYSAnnotation) o;
301 fa.setTheme(theme);
297 fa.setLabel(facet.getDescription()); 302 fa.setLabel(facet.getDescription());
298 addAnnotations(fa, visible); 303 addAnnotations(fa, visible);
299 } 304 }
300 305
301 306

http://dive4elements.wald.intevation.org