Mercurial > dive4elements > gnv-client
view gnv-artifacts/src/main/java/de/intevation/gnv/chart/AbstractChart.java @ 299:d6c75171f1e9
Pass the xml document of the request to OutputTransition for more information about output formats of charts (png,jpeg).
gnv-artifacts/trunk@353 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 19 Nov 2009 17:54:18 +0000 |
parents | 3f43392df3f6 |
children | 3ea030aafe65 |
line wrap: on
line source
package de.intevation.gnv.chart; import java.util.Collection; import java.util.Iterator; import java.util.Date; import java.util.Locale; import java.awt.Transparency; import java.awt.image.BufferedImage; import org.apache.log4j.Logger; import org.jfree.chart.JFreeChart; import org.jfree.chart.ChartTheme; import org.jfree.data.time.TimeSeriesCollection; /** * @author Ingo Weinzierl <ingo.weinzierl@intevation.de> */ public abstract class AbstractChart implements Chart { private static Logger log = Logger.getLogger(AbstractChart.class); protected JFreeChart chart; protected Locale locale; protected ChartLabels labels; protected ChartTheme theme; protected Collection parameters; protected Collection measurements; protected Collection resultSet; protected Collection dates; public abstract JFreeChart generateChart(); public BufferedImage exportPNG(int width, int height) { log.info("export chart as png"); return chart.createBufferedImage( width, height, Transparency.BITMASK, null); } public void exportSVG() { log.info("export chart as svg (not implemented yet)"); } public void exportPDF() { log.info("export chart as pdf (not implemented yet)"); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=latin1 :