public abstract class AbstractChartDataConsumer extends SimplePropertyObject implements ITableDataConsumer
Modifier and Type | Field and Description |
---|---|
protected JFreeChart |
chart
The chart.
|
pcs, properties
Constructor and Description |
---|
AbstractChartDataConsumer()
Create a new chart consumer.
|
Modifier and Type | Method and Description |
---|---|
protected 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.
|
void |
consumeData(long currenttime,
double tick)
Consume data from the provider.
|
protected abstract JFreeChart |
createChart()
Create a chart with the underlying dataset.
|
JFreeChart |
getChart()
Get the chart.
|
javax.swing.JPanel |
getChartPanel()
Get the chart panel.
|
protected ResourceInfo |
getResourceInfo(java.lang.String name,
java.lang.String[] imports,
java.lang.ClassLoader classloader)
Find the file for a given name.
|
AbstractEnvironmentSpace |
getSpace()
Get the space.
|
protected ITableDataProvider |
getTableDataProvider()
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.
|
void |
refresh()
Refresh the chart.
|
addPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProperty, getPropertyNames, hasProperty, setProperty
public AbstractChartDataConsumer()
public void consumeData(long currenttime, double tick)
consumeData
in interface ITableDataConsumer
currenttime
- The current time.tick
- The current tick.protected java.lang.Object[] getValues(int num, DataTable data, java.lang.Object[] row, SimpleValueFetcher fetcher)
public JFreeChart getChart()
public void refresh()
public AbstractEnvironmentSpace getSpace()
protected ITableDataProvider getTableDataProvider()
protected ResourceInfo getResourceInfo(java.lang.String name, java.lang.String[] imports, java.lang.ClassLoader classloader) throws java.lang.Exception
name
- The filename or logical name (resolved via imports and extension).extension
- The required extension.imports
- The imports, if any.java.lang.Exception
public javax.swing.JPanel getChartPanel()
protected abstract JFreeChart createChart()
protected abstract void addValue(java.lang.Comparable seriesname, java.lang.Object valx, java.lang.Object valy, DataTable data, java.lang.Object[] row)
seriesname
- The seriesname.valx
- The x value.valy
- The y value.data
- The data table.row
- The current data row.