java/cewolf-1.0/src/main/java/de/laures/cewolf/taglib/SimpleChartDefinition.java
author František Kučera <franta-hg@frantovo.cz>
Sat, 28 Feb 2009 21:31:02 +0100
changeset 1 639991d0808a
permissions -rw-r--r--
Rozbalená knihovna verze 1.0
     1 /*
     2  * Created on 13.04.2003
     3  *
     4  * To change the template for this generated file go to
     5  * Window>Preferences>Java>Code Generation>Code and Comments
     6  */
     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 /**
    20  * @author guido
    21  *
    22  * To change the template for this generated type comment go to
    23  * Window>Preferences>Java>Code Generation>Code and Comments
    24  */
    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 }