|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object be.ac.ulg.montefiore.run.totem.chart.model.Chart
public class Chart
Class used to collect data and create charts using the data It used a ChartDataCollector to collect the data and a ChartPlotter to generate the chart. The instances of both these interfaces should be registered in the global preferences of the toolbox under AVAILABLE-DATA-COLLECTORS and AVAILABLE-CHART-PLOTTERS respectively. The collected data are maintained in a ChartData structure.
ChartData
,
ChartDataCollector
,
Creation date: 16 d�c. 2005
Constructor Summary | |
---|---|
Chart(java.lang.String dataCollectorName,
java.util.HashMap<java.lang.String,java.lang.String> params)
Build a Chart object that is able to collect data with the specified collector. |
Method Summary | |
---|---|
void |
addSeries(java.lang.String name,
java.util.HashMap<java.lang.String,java.lang.String> params)
Add a series of data to the collected data. |
ChartDataCollector |
getCollector()
|
ChartData |
getData()
|
org.jfree.chart.JFreeChart |
getPlot()
|
void |
plot(java.lang.String chartPlotterName,
java.lang.String title,
java.lang.String xAxisTitle,
java.lang.String yAxisTitle,
java.util.HashMap<java.lang.String,java.lang.String> params)
Create the JFreeChart object. |
void |
setData(ChartData data)
Set the data used to compute the |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Chart(java.lang.String dataCollectorName, java.util.HashMap<java.lang.String,java.lang.String> params) throws ChartParameterException
dataCollectorName
- params
-
ChartParameterException
Method Detail |
---|
public void addSeries(java.lang.String name, java.util.HashMap<java.lang.String,java.lang.String> params) throws ChartParameterException
name
- of the serie to addparams
-
ChartParameterException
- if the name already exists in the datapublic void plot(java.lang.String chartPlotterName, java.lang.String title, java.lang.String xAxisTitle, java.lang.String yAxisTitle, java.util.HashMap<java.lang.String,java.lang.String> params) throws ChartParameterException
plot()
method of the ChartPlotter whose name is given as argument
A reference to the last generated chart can be obtained by getPlot()
chartPlotterName
- the simple name of the class corresponding to a registered extend of the interface ChartPlotter.title
- Title of the chartxAxisTitle
- X Axis LabelyAxisTitle
- Y Axis Labelparams
- Parameters to pass to the plot method of the chosen chartPlotter
ChartParameterException
public org.jfree.chart.JFreeChart getPlot()
public void setData(ChartData data)
data
- public ChartData getData()
public ChartDataCollector getCollector()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |