Package repast.simphony.chart2
Class XYDataSinkValueSeries
java.lang.Object
repast.simphony.chart2.AbstractXYSeriesDataSink
repast.simphony.chart2.XYDataSinkValueSeries
- All Implemented Interfaces:
DataSink
DataSink that appends data into series. A series is created for each unique
value produced by a specified data source. For example, if the data source
corresponds to an agent id, then a series will be created for each unique
agent id produced by that source.
- Author:
- Nick Collier
-
Nested Class Summary
-
Field Summary
Fields inherited from class repast.simphony.chart2.AbstractXYSeriesDataSink
xId, xydata
-
Constructor Summary
ConstructorDescriptionXYDataSinkValueSeries
(BatchUpdateXYSeries xydata, String dataSourceSeriesId, String dataValueSourceId) Creates a XYDataSinkValueSeries that will add series to the specified XYSeriesCollection and update those series. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Appends the specified data to this sink.void
close()
Close this DataSink.void
Open this DataSink.void
Notified this DataSink that the current record has ended.void
rowEnded()
Notifies this DataSink that the last append was end of a "row."void
Notifies this DataSink that the next append is that start of a "row." of data.Methods inherited from class repast.simphony.chart2.AbstractXYSeriesDataSink
flush, getXSourceId, setXSourceId
-
Constructor Details
-
XYDataSinkValueSeries
public XYDataSinkValueSeries(BatchUpdateXYSeries xydata, String dataSourceSeriesId, String dataValueSourceId) Creates a XYDataSinkValueSeries that will add series to the specified XYSeriesCollection and update those series. A series is created for each unique value produced by a specified data source. 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
-dataSourceSeriesId
- the id of the data source that produces the series value.
-
-
Method Details
-
open
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
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
-
recordEnded
public void recordEnded()Description copied from interface:DataSink
Notified this DataSink that the current record has ended.- Specified by:
recordEnded
in interfaceDataSink
- Overrides:
recordEnded
in classAbstractXYSeriesDataSink
-
rowEnded
public void rowEnded()Description copied from interface:DataSink
Notifies this DataSink that the last append was end of a "row." -
close
public void close()Description copied from interface:DataSink
Close this DataSink.- Specified by:
close
in interfaceDataSink
- Overrides:
close
in classAbstractXYSeriesDataSink
-