diff -r 1612dbcec451 -r 639991d0808a java/cewolf-1.0/src/main/java/de/laures/cewolf/taglib/SimpleChartDefinition.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/cewolf-1.0/src/main/java/de/laures/cewolf/taglib/SimpleChartDefinition.java Sat Feb 28 21:31:02 2009 +0100 @@ -0,0 +1,43 @@ +/* + * Created on 13.04.2003 + * + * To change the template for this generated file go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +package de.laures.cewolf.taglib; + +import java.io.Serializable; +import java.util.Map; + +import org.jfree.chart.JFreeChart; +import org.jfree.data.general.Dataset; + +import de.laures.cewolf.ChartValidationException; +import de.laures.cewolf.DatasetProduceException; +import de.laures.cewolf.DatasetProducer; + +/** + * @author guido + * + * To change the template for this generated type comment go to + * Window>Preferences>Java>Code Generation>Code and Comments + */ +public class SimpleChartDefinition extends AbstractChartDefinition implements DataAware, Serializable { + + private DataContainer dataAware = new DataContainer(); + + protected JFreeChart produceChart() throws DatasetProduceException, ChartValidationException { + return CewolfChartFactory.getChartInstance(type, title, xAxisLabel, yAxisLabel, (Dataset)getDataset()); + } + + public Object getDataset() throws DatasetProduceException { + return dataAware.getDataset(); + } + + public void setDataProductionConfig(DatasetProducer dsp, Map params, boolean useCache) { + dataAware.setDataProductionConfig(dsp, params, useCache); + } + + + +}