public class IlvDefaultDataSource extends IlvAbstractDataSource
Constructor and Description |
---|
IlvDefaultDataSource()
Creates a new, empty data source.
|
IlvDefaultDataSource(double[][] values,
int xSeriesIdx,
String[] names,
String[] dataLabels)
Creates a new data source and initializes it with the specified data.
|
IlvDefaultDataSource(IlvDataSet[] dataSets)
Creates a new data source and initializes it with the specified data sets.
|
Modifier and Type | Method and Description |
---|---|
void |
addDataSet(IlvDataSet dataSet)
Adds a new data set at the end of this data source.
|
void |
addDataSet(int index,
IlvDataSet dataSet)
Inserts a new data set at the specified position.
|
IlvDataSet |
getDataSetAtPosition(int targetIndex)
Returns the data set at a specified target position.
|
void |
setDataSet(int idx,
IlvDataSet dataSet)
Replaces the data set at the specified position.
|
void |
setDataSetAtPosition(int targetIndex,
IlvDataSet dataSet)
Sets the data set at a specified target position.
|
void |
setDataSets(IlvDataSet[] dataSets)
Initializes this data source with the specified data sets.
|
addDataSourceListener, containsDataSet, endBatch, fireDataSourceEvent, getDataSet, getDataSetByName, getDataSetCount, getDataSetIndex, getDataSetIterator, getDataSetList, getDataSets, initDataSets, removeDataSourceListener, startBatch
public IlvDefaultDataSource()
public IlvDefaultDataSource(IlvDataSet[] dataSets)
public void setDataSet(int idx, IlvDataSet dataSet)
Note: In order to set all data sets using this method, you must perform the invocations of this method in a particular order: with increasing indices.
setDataSet
in interface IlvDataSource
setDataSet
in class IlvAbstractDataSource
idx
- The index of the data set to replace.dataSet
- The new data set. If this parameter is null
,
the data set at the index idx
is removed.public void addDataSet(IlvDataSet dataSet)
addDataSet
in interface IlvDataSource
addDataSet
in class IlvAbstractDataSource
public void addDataSet(int index, IlvDataSet dataSet)
addDataSet
in interface IlvDataSource
addDataSet
in class IlvAbstractDataSource
public void setDataSets(IlvDataSet[] dataSets)
setDataSets
in interface IlvDataSource
setDataSets
in class IlvAbstractDataSource
dataSets
- The new data sets. If this parameter is null
,
all the data sets provided by this data source are removed.public IlvDataSet getDataSetAtPosition(int targetIndex)
This method considers only data sets added with
setDataSetAtPosition(int, ilog.views.chart.data.IlvDataSet)
.
targetIndex
- The registered target index of the searched data set.
This is not necessarily its current index.null
.setDataSetAtPosition(int, ilog.views.chart.data.IlvDataSet)
public void setDataSetAtPosition(int targetIndex, IlvDataSet dataSet)
Unlike setDataSet(int, ilog.views.chart.data.IlvDataSet)
, this method remembers the target position
for each data set; temporarily the index of the data set may be smaller
than the target index.
Therefore, with this method, it is possible to set all data sets
through invocations in an arbitrary order.
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.