Package repast.simphony.chart2
Class XYDataSinkSourceSeries
- java.lang.Object
-
- repast.simphony.chart2.AbstractXYSeriesDataSink
-
- repast.simphony.chart2.XYDataSinkSourceSeries
-
- All Implemented Interfaces:
DataSink
public class XYDataSinkSourceSeries extends AbstractXYSeriesDataSink
DataSink that appends data into series. A series is created for each individual data source.- Author:
- Nick Collier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
XYDataSinkSourceSeries.Row
protected static class
XYDataSinkSourceSeries.SeriesData
-
Field Summary
Fields Modifier and Type Field Description protected XYDataSinkSourceSeries.Row
row
-
Fields inherited from class repast.simphony.chart2.AbstractXYSeriesDataSink
xId, xydata
-
-
Constructor Summary
Constructors Constructor Description XYDataSinkSourceSeries(BatchUpdateXYSeries xydata)
Creates a XYDataSinkSourceSeries that will add series to the specified XYSeriesCollection and update those series.XYDataSinkSourceSeries(BatchUpdateXYSeries xydata, List<String> sourceIds)
Creates a XYDataSinkSourceSeries that will add series to the specified XYSeriesCollection and update those series.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(String key, Object value)
Appends the specified data to this sink.void
open(List<String> sourceIds)
Open this DataSink.void
rowEnded()
Notifies this DataSink that the last append was end of a "row."void
rowStarted()
Notifies this DataSink that the next append is that start of a "row." of data.-
Methods inherited from class repast.simphony.chart2.AbstractXYSeriesDataSink
close, flush, getXSourceId, recordEnded, setXSourceId
-
-
-
-
Field Detail
-
row
protected XYDataSinkSourceSeries.Row row
-
-
Constructor Detail
-
XYDataSinkSourceSeries
public XYDataSinkSourceSeries(BatchUpdateXYSeries xydata)
Creates a XYDataSinkSourceSeries that will add series to the specified XYSeriesCollection and update those series. Each series records successive x and y values where the x value is the value of the "X" (e.g. tick) data source, and the y value is the value returned by that data source.- Parameters:
xydata
-
-
XYDataSinkSourceSeries
public XYDataSinkSourceSeries(BatchUpdateXYSeries xydata, List<String> sourceIds)
Creates a XYDataSinkSourceSeries that will add series to the specified XYSeriesCollection and update those series.- Parameters:
xydata
-
-
-
Method Detail
-
open
public void open(List<String> sourceIds)
Description copied from interface:DataSink
Open this DataSink.- Parameters:
sourceIds
- a list of the DataSource ids for which this is the sink.
-
rowStarted
public void rowStarted()
Description copied from interface:DataSink
Notifies this DataSink that the next append is that start of a "row." of data.
-
append
public void append(String key, Object value)
Description copied from interface:DataSink
Appends the specified data to this sink. The key can be, for example, a column name and the value the current value for that column.- Parameters:
key
- the data's keyvalue
- the data's value
-
rowEnded
public void rowEnded()
Description copied from interface:DataSink
Notifies this DataSink that the last append was end of a "row."
-
-