1 7 package de.laures.cewolf.taglib; 8 9 import java.io.Serializable ; 10 import java.util.Map ; 11 12 import org.jfree.chart.JFreeChart; 13 import org.jfree.data.general.Dataset; 14 15 import de.laures.cewolf.ChartValidationException; 16 import de.laures.cewolf.DatasetProduceException; 17 import de.laures.cewolf.DatasetProducer; 18 19 25 public class SimpleChartDefinition extends AbstractChartDefinition implements DataAware, Serializable { 26 27 private DataContainer dataAware = new DataContainer(); 28 29 protected JFreeChart produceChart() throws DatasetProduceException, ChartValidationException { 30 return CewolfChartFactory.getChartInstance(type, title, xAxisLabel, yAxisLabel, (Dataset)getDataset()); 31 } 32 33 public Object getDataset() throws DatasetProduceException { 34 return dataAware.getDataset(); 35 } 36 37 public void setDataProductionConfig(DatasetProducer dsp, Map params, boolean useCache) { 38 dataAware.setDataProductionConfig(dsp, params, useCache); 39 } 40 41 42 43 } 44 | Popular Tags |