Class AbstractChartDataConsumer
- java.lang.Object
- 
- jadex.commons.SimplePropertyObject
- 
- jadex.extension.envsupport.evaluation.AbstractChartDataConsumer
 
 
- 
- All Implemented Interfaces:
- IPropertyObject,- ITableDataConsumer
 - Direct Known Subclasses:
- CategoryChartDataConsumer,- HistogramDataConsumer,- TimeChartDataConsumer,- XYChartDataConsumer
 
 public abstract class AbstractChartDataConsumer extends SimplePropertyObject implements ITableDataConsumer Abstract base class for chart consumers.
- 
- 
Field SummaryFields Modifier and Type Field Description protected org.jfree.chart.JFreeChartchartThe chart.- 
Fields inherited from class jadex.commons.SimplePropertyObjectpcs, properties
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractChartDataConsumer()Create a new chart consumer.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddValue(java.lang.Comparable seriesname, java.lang.Object valx, java.lang.Object valy, DataTable data, java.lang.Object[] row)Add a value to a specific series of the chart.voidconsumeData(long currenttime, double tick)Consume data from the provider.protected abstract org.jfree.chart.JFreeChartcreateChart()Create a chart with the underlying dataset.org.jfree.chart.JFreeChartgetChart()Get the chart.javax.swing.JPanelgetChartPanel()Get the chart panel.protected ResourceInfogetResourceInfo(java.lang.String name, java.lang.String[] imports, java.lang.ClassLoader classloader)Find the file for a given name.AbstractEnvironmentSpacegetSpace()Get the space.protected ITableDataProvidergetTableDataProvider()Get the table data provider.protected java.lang.Object[]getValues(int num, DataTable data, java.lang.Object[] row, SimpleValueFetcher fetcher)Get the x/y values for a specific series number.voidrefresh()Refresh the chart.- 
Methods inherited from class jadex.commons.SimplePropertyObjectaddPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.commons.IPropertyObjectgetProperty, getPropertyNames, hasProperty, setProperty
 
- 
 
- 
- 
- 
Method Detail- 
consumeDatapublic void consumeData(long currenttime, double tick)Consume data from the provider.- Specified by:
- consumeDatain interface- ITableDataConsumer
- Parameters:
- currenttime- The current time.
- tick- The current tick.
 
 - 
getValuesprotected java.lang.Object[] getValues(int num, DataTable data, java.lang.Object[] row, SimpleValueFetcher fetcher)Get the x/y values for a specific series number. In case of a multi series the row array defines the specific data to read.
 - 
getChartpublic org.jfree.chart.JFreeChart getChart() Get the chart.- Returns:
- The chart.
 
 - 
refreshpublic void refresh() Refresh the chart.
 - 
getSpacepublic AbstractEnvironmentSpace getSpace() Get the space.- Returns:
- The space.
 
 - 
getTableDataProviderprotected ITableDataProvider getTableDataProvider() Get the table data provider.- Returns:
- The table data provider.
 
 - 
getResourceInfoprotected ResourceInfo getResourceInfo(java.lang.String name, java.lang.String[] imports, java.lang.ClassLoader classloader) throws java.lang.Exception Find the file for a given name.- Parameters:
- name- The filename or logical name (resolved via imports and extension).
- extension- The required extension.
- imports- The imports, if any.
- Returns:
- The resource info identifying the file.
- Throws:
- java.lang.Exception
 
 - 
getChartPanelpublic javax.swing.JPanel getChartPanel() Get the chart panel.- Returns:
- The chart panel.
 
 - 
createChartprotected abstract org.jfree.chart.JFreeChart createChart() Create a chart with the underlying dataset.- Returns:
- The chart.
 
 - 
addValueprotected abstract void addValue(java.lang.Comparable seriesname, java.lang.Object valx, java.lang.Object valy, DataTable data, java.lang.Object[] row)Add a value to a specific series of the chart.- Parameters:
- seriesname- The seriesname.
- valx- The x value.
- valy- The y value.
- data- The data table.
- row- The current data row.
 
 
- 
 
-