java/cewolf-1.0/src/main/java/de/laures/cewolf/taglib/SimpleChartDefinition.java
changeset 1 639991d0808a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/cewolf-1.0/src/main/java/de/laures/cewolf/taglib/SimpleChartDefinition.java	Sat Feb 28 21:31:02 2009 +0100
     1.3 @@ -0,0 +1,43 @@
     1.4 +/*
     1.5 + * Created on 13.04.2003
     1.6 + *
     1.7 + * To change the template for this generated file go to
     1.8 + * Window>Preferences>Java>Code Generation>Code and Comments
     1.9 + */
    1.10 +package de.laures.cewolf.taglib;
    1.11 +
    1.12 +import java.io.Serializable;
    1.13 +import java.util.Map;
    1.14 +
    1.15 +import org.jfree.chart.JFreeChart;
    1.16 +import org.jfree.data.general.Dataset;
    1.17 +
    1.18 +import de.laures.cewolf.ChartValidationException;
    1.19 +import de.laures.cewolf.DatasetProduceException;
    1.20 +import de.laures.cewolf.DatasetProducer;
    1.21 +
    1.22 +/**
    1.23 + * @author guido
    1.24 + *
    1.25 + * To change the template for this generated type comment go to
    1.26 + * Window>Preferences>Java>Code Generation>Code and Comments
    1.27 + */
    1.28 +public class SimpleChartDefinition extends AbstractChartDefinition implements DataAware, Serializable {
    1.29 +
    1.30 +	private DataContainer dataAware = new DataContainer();
    1.31 +	
    1.32 +    protected JFreeChart produceChart() throws DatasetProduceException, ChartValidationException {
    1.33 +    	return CewolfChartFactory.getChartInstance(type, title, xAxisLabel, yAxisLabel, (Dataset)getDataset());
    1.34 +    }
    1.35 +
    1.36 +    public Object getDataset() throws DatasetProduceException {
    1.37 +        return dataAware.getDataset();
    1.38 +    }
    1.39 +
    1.40 +    public void setDataProductionConfig(DatasetProducer dsp, Map params, boolean useCache) {
    1.41 +    	dataAware.setDataProductionConfig(dsp, params, useCache);
    1.42 +    }
    1.43 +
    1.44 +    
    1.45 +
    1.46 +}