KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > laures > cewolf > taglib > SimpleChartDefinition


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 JavaDoc;
10 import java.util.Map JavaDoc;
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 JavaDoc {
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 JavaDoc getDataset() throws DatasetProduceException {
34         return dataAware.getDataset();
35     }
36
37     public void setDataProductionConfig(DatasetProducer dsp, Map JavaDoc params, boolean useCache) {
38         dataAware.setDataProductionConfig(dsp, params, useCache);
39     }
40
41     
42
43 }
44
Popular Tags