franta-hg@1
|
1 |
/*
|
franta-hg@1
|
2 |
* Created on 13.04.2003
|
franta-hg@1
|
3 |
*
|
franta-hg@1
|
4 |
* To change the template for this generated file go to
|
franta-hg@1
|
5 |
* Window>Preferences>Java>Code Generation>Code and Comments
|
franta-hg@1
|
6 |
*/
|
franta-hg@1
|
7 |
package de.laures.cewolf.taglib;
|
franta-hg@1
|
8 |
|
franta-hg@1
|
9 |
import java.io.Serializable;
|
franta-hg@1
|
10 |
import java.util.Map;
|
franta-hg@1
|
11 |
|
franta-hg@1
|
12 |
import org.jfree.chart.JFreeChart;
|
franta-hg@1
|
13 |
import org.jfree.data.general.Dataset;
|
franta-hg@1
|
14 |
|
franta-hg@1
|
15 |
import de.laures.cewolf.ChartValidationException;
|
franta-hg@1
|
16 |
import de.laures.cewolf.DatasetProduceException;
|
franta-hg@1
|
17 |
import de.laures.cewolf.DatasetProducer;
|
franta-hg@1
|
18 |
|
franta-hg@1
|
19 |
/**
|
franta-hg@1
|
20 |
* @author guido
|
franta-hg@1
|
21 |
*
|
franta-hg@1
|
22 |
* To change the template for this generated type comment go to
|
franta-hg@1
|
23 |
* Window>Preferences>Java>Code Generation>Code and Comments
|
franta-hg@1
|
24 |
*/
|
franta-hg@1
|
25 |
public class SimpleChartDefinition extends AbstractChartDefinition implements DataAware, Serializable {
|
franta-hg@1
|
26 |
|
franta-hg@1
|
27 |
private DataContainer dataAware = new DataContainer();
|
franta-hg@1
|
28 |
|
franta-hg@1
|
29 |
protected JFreeChart produceChart() throws DatasetProduceException, ChartValidationException {
|
franta-hg@1
|
30 |
return CewolfChartFactory.getChartInstance(type, title, xAxisLabel, yAxisLabel, (Dataset)getDataset());
|
franta-hg@1
|
31 |
}
|
franta-hg@1
|
32 |
|
franta-hg@1
|
33 |
public Object getDataset() throws DatasetProduceException {
|
franta-hg@1
|
34 |
return dataAware.getDataset();
|
franta-hg@1
|
35 |
}
|
franta-hg@1
|
36 |
|
franta-hg@1
|
37 |
public void setDataProductionConfig(DatasetProducer dsp, Map params, boolean useCache) {
|
franta-hg@1
|
38 |
dataAware.setDataProductionConfig(dsp, params, useCache);
|
franta-hg@1
|
39 |
}
|
franta-hg@1
|
40 |
|
franta-hg@1
|
41 |
|
franta-hg@1
|
42 |
|
franta-hg@1
|
43 |
}
|