public abstract class IlvAbstractDataSource extends Object implements IlvDataSource, IlvBatchable, Serializable
IlvDataSource
interface.
DataSourceListener
listeners
and provides methods to generate and dispatch DataSourceEvent
events.initDataSets(ilog.views.chart.data.IlvDataSet[])
method.Modifier | Constructor and Description |
---|---|
protected |
IlvAbstractDataSource()
Creates a new
IlvAbstractDataSource . |
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 idx,
IlvDataSet dataSet)
Inserts a new data set at the specified position.
|
void |
addDataSourceListener(DataSourceListener listener)
Adds the specified listener to receive events concerning changes
in the contents of this data source.
|
boolean |
containsDataSet(IlvDataSet dataSet)
Tells whether this data source contains the specified data set.
|
void |
endBatch()
Signals the end of a series of changes to the data source.
|
void |
fireDataSourceEvent(DataSourceEvent event)
Fires a data source event to all subscribed listeners.
|
IlvDataSet |
getDataSet(int idx)
Returns the data set at the specified index.
|
IlvDataSet |
getDataSetByName(String dataSetName)
Returns the data set with the given name, of
null if there
is none. |
int |
getDataSetCount()
Returns the number of data sets provided by this data source.
|
int |
getDataSetIndex(IlvDataSet dataSet)
Returns the index of the specified data set.
|
Iterator<IlvDataSet> |
getDataSetIterator()
Returns an iterator over the data sets provided by this data source.
|
protected IlvDataSetList |
getDataSetList()
Returns the internal list of data sets handled by the data source.
|
IlvDataSet[] |
getDataSets()
Returns the data sets provided by this data source.
|
protected void |
initDataSets(IlvDataSet[] dataSets)
Initializes the data source with the specified data sets.
|
void |
removeDataSourceListener(DataSourceListener listener)
Removes the specified listener.
|
void |
setDataSet(int idx,
IlvDataSet dataSet)
Replaces the data set at the specified index.
|
void |
setDataSets(IlvDataSet[] dataSets)
Initializes this data source with the specified data sets.
|
void |
startBatch()
Signals the beginning of a series of changes to the data source.
|
protected IlvAbstractDataSource()
IlvAbstractDataSource
.public int getDataSetCount()
getDataSetCount
in interface IlvDataSource
public IlvDataSet[] getDataSets()
getDataSets
in interface IlvDataSource
public Iterator<IlvDataSet> getDataSetIterator()
IlvDataSet
.
The returned iterator does not allow the element removal
(an UnsupportedOperationException
is thrown when
calling the remove
method).getDataSetIterator
in interface IlvDataSource
IlvDataSet
elementspublic IlvDataSet getDataSet(int idx)
getDataSet
in interface IlvDataSource
public int getDataSetIndex(IlvDataSet dataSet)
getDataSetIndex
in interface IlvDataSource
dataSet
- The considered data set.-1
if
the data set is not handled by the data source.public boolean containsDataSet(IlvDataSet dataSet)
containsDataSet
in interface IlvDataSource
public void addDataSourceListener(DataSourceListener listener)
addDataSourceListener
in interface IlvDataSource
public void removeDataSourceListener(DataSourceListener listener)
removeDataSourceListener
in interface IlvDataSource
public void setDataSet(int idx, IlvDataSet dataSet)
setDataSet
in interface IlvDataSource
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 setDataSets(IlvDataSet[] dataSets)
setDataSets
in interface IlvDataSource
dataSets
- The new data sets. If this parameter is null
,
all the data sets provided by this data source should be removed.public void addDataSet(int idx, IlvDataSet dataSet)
addDataSet
in interface IlvDataSource
public void addDataSet(IlvDataSet dataSet)
addDataSet
in interface IlvDataSource
public void fireDataSourceEvent(DataSourceEvent event)
public void startBatch()
startBatch
in interface IlvBatchable
public void endBatch()
endBatch
in interface IlvBatchable
protected void initDataSets(IlvDataSet[] dataSets)
protected IlvDataSetList getDataSetList()
public IlvDataSet getDataSetByName(String dataSetName)
null
if there
is none.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.