franta-hg@1: /* franta-hg@1: * Created on 13.04.2003 franta-hg@1: * franta-hg@1: * To change the template for this generated file go to franta-hg@1: * Window>Preferences>Java>Code Generation>Code and Comments franta-hg@1: */ franta-hg@1: package de.laures.cewolf.taglib; franta-hg@1: franta-hg@1: import java.io.Serializable; franta-hg@1: import java.util.Map; franta-hg@1: franta-hg@1: import org.jfree.chart.JFreeChart; franta-hg@1: import org.jfree.data.general.Dataset; franta-hg@1: franta-hg@1: import de.laures.cewolf.ChartValidationException; franta-hg@1: import de.laures.cewolf.DatasetProduceException; franta-hg@1: import de.laures.cewolf.DatasetProducer; franta-hg@1: franta-hg@1: /** franta-hg@1: * @author guido franta-hg@1: * franta-hg@1: * To change the template for this generated type comment go to franta-hg@1: * Window>Preferences>Java>Code Generation>Code and Comments franta-hg@1: */ franta-hg@1: public class SimpleChartDefinition extends AbstractChartDefinition implements DataAware, Serializable { franta-hg@1: franta-hg@1: private DataContainer dataAware = new DataContainer(); franta-hg@1: franta-hg@1: protected JFreeChart produceChart() throws DatasetProduceException, ChartValidationException { franta-hg@1: return CewolfChartFactory.getChartInstance(type, title, xAxisLabel, yAxisLabel, (Dataset)getDataset()); franta-hg@1: } franta-hg@1: franta-hg@1: public Object getDataset() throws DatasetProduceException { franta-hg@1: return dataAware.getDataset(); franta-hg@1: } franta-hg@1: franta-hg@1: public void setDataProductionConfig(DatasetProducer dsp, Map params, boolean useCache) { franta-hg@1: dataAware.setDataProductionConfig(dsp, params, useCache); franta-hg@1: } franta-hg@1: franta-hg@1: franta-hg@1: franta-hg@1: }