view gnv-artifacts/src/main/java/de/intevation/gnv/chart/AbstractChart.java @ 308:677da0e143cc

Added dependencies for esri and ibm libraries required for unit tests. gnv-artifacts/trunk@366 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 24 Nov 2009 14:40:53 +0000
parents 9ba2cf8cad8d
children 45625b5cd6d4
line wrap: on
line source
package de.intevation.gnv.chart;

import java.util.Collection;
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;

/**
 * @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 exportImage(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 :

http://dive4elements.wald.intevation.org