public class IlvFilterDataSet extends IlvAbstractDataSet implements Cloneable
All the immediate data access methods on this data set are implemented by an indirection to the underlying data set. Subclasses will override some of these methods to actually implement filtering or other additional functionalities.
An instance of this class automatically propagates notification events from the underlying data set to its own listeners.
A generalization of this class for multiple data sets is found in the class
IlvCombinedDataSet
.
IlvCombinedDataSet
,
Serialized FormDEFAULT_UNDEF_VALUE
Constructor and Description |
---|
IlvFilterDataSet()
Creates a filter data set without any underlying data set.
|
IlvFilterDataSet(IlvDataSet dataSet)
Creates a filter data set.
|
Modifier and Type | Method and Description |
---|---|
void |
addData(double x,
double y)
This method may be overridden in subclasses.
|
Object |
clone()
Returns a copy of this object.
|
void |
disconnect()
Drops references to objects to help garbage collection.
|
void |
dispose()
Cleans up this data set and drops references to objects to
help garbage collection.
|
int |
getDataCount()
This method may be overridden in subclasses.
|
String |
getDataLabel(int idx)
This method may be overridden in subclasses.
|
IlvDataSet |
getFilteredDataSet()
Returns the underlying data set.
|
String |
getName()
Returns the name of this data set, if a non-
null name has
been explicitly set. |
Double |
getUndefValue()
This method may be overridden in subclasses.
|
double |
getXData(int idx)
This method may be overridden in subclasses.
|
IlvDataInterval |
getXRange(IlvDataInterval range)
This method may be overridden in subclasses.
|
double |
getYData(int idx)
This method may be overridden in subclasses.
|
IlvDataInterval |
getYRange(IlvDataInterval range)
This method may be overridden in subclasses.
|
boolean |
isEditable()
This method may be overridden in subclasses.
|
boolean |
isXValuesSorted()
This method may be overridden in subclasses.
|
void |
noteAfterDataChanged(int firstIdx,
int lastIdx)
Reacts on an
AFTER_DATA_CHANGED event from the underlying
data set. |
void |
noteBatchBegin()
Reacts on a
BATCH_BEGIN event from the underlying data set. |
void |
noteBatchEnd()
Reacts on a
BATCH_END event from the underlying data set. |
void |
noteBeforeDataChanged(int firstIdx,
int lastIdx)
Reacts on a
BEFORE_DATA_CHANGED event from the underlying
data set. |
void |
noteDataAdded(int firstIdx,
int lastIdx)
Reacts on a
DATA_ADDED event from the underlying data set. |
void |
noteDataChanged(int firstIdx,
int lastIdx)
Reacts on a
DATA_CHANGED event from the underlying data set. |
void |
noteDataLabelChanged(int firstIdx,
int lastIdx)
Reacts on a
DATA_LABEL_CHANGED event from the underlying
data set. |
void |
noteDataSetPropertyChanged(String propertyName,
Object oldValue,
Object newValue)
Reacts on a
DataSetPropertyEvent event from the underlying
data set. |
void |
noteFullUpdate()
Reacts on a
FULL_UPDATE event from the underlying data set. |
void |
setData(int idx,
double x,
double y)
This method may be overridden in subclasses.
|
void |
setFilteredDataSet(IlvDataSet dataSet)
Sets the underlying data set.
|
void |
setName(String name)
Sets the name of this data set.
|
addDataSetListener, computeLimits, computeMinimumXDifference, dataAdded, dataChanged, endBatch, fireDataAddedEvent, fireDataChangedEvent, fireDataSetContentsEvent, fireDataSetPropertyEvent, getData, getDataBetween, getDataInside, getDataInside, getMinimumXDifference, getProperty, getXRange, getYRange, invalidateLimits, invalidateLimits, invalidateLimits, isBatched, isXRangeIncludingUndefinedPoints, putProperty, removeDataSetListener, setLimitsValid, setUndefValue, setXRangeIncludingUndefinedPoints, startBatch, toString
public IlvFilterDataSet()
setFilteredDataSet
in order to specify the
underlying data set.public IlvFilterDataSet(IlvDataSet dataSet)
dataSet
- The underlying data set.public int getDataCount()
getDataCount
in interface IlvDataSet
getDataCount
in class IlvAbstractDataSet
public double getXData(int idx)
getXData
in interface IlvDataSet
getXData
in class IlvAbstractDataSet
idx
- a data point index, >= 0, < getDataCount()
public double getYData(int idx)
getYData
in interface IlvDataSet
getYData
in class IlvAbstractDataSet
idx
- a data point index, >= 0, < getDataCount()
public void setData(int idx, double x, double y)
setData
in interface IlvDataSet
setData
in class IlvAbstractDataSet
idx
- a data point index, >= 0, < getDataCount()
x
- the new x coordinate of the point (if this data set supports
setting arbitrary x values)y
- the new y coordinate of the pointpublic void addData(double x, double y)
addData
in interface IlvDataSet
addData
in class IlvAbstractDataSet
x
- the x coordinate of the new pointy
- the y coordinate of the new pointpublic String getDataLabel(int idx)
getDataLabel
in interface IlvDataSet
getDataLabel
in class IlvAbstractDataSet
idx
- a data point index, >= 0, < getDataCount()
public boolean isEditable()
isEditable
in interface IlvDataSet
isEditable
in class IlvAbstractDataSet
false
, as IlvAbstractDataSet
provides
empty implementation for editing operations.public Double getUndefValue()
getUndefValue
in interface IlvDataSet
getUndefValue
in class IlvAbstractDataSet
public IlvDataInterval getXRange(IlvDataInterval range)
getXRange
in interface IlvDataSet
getXRange
in class IlvAbstractDataSet
IlvAbstractDataSet.isXRangeIncludingUndefinedPoints()
public IlvDataInterval getYRange(IlvDataInterval range)
getYRange
in interface IlvDataSet
getYRange
in class IlvAbstractDataSet
public boolean isXValuesSorted()
isXValuesSorted
in interface IlvDataSet
isXValuesSorted
in class IlvAbstractDataSet
public void noteBatchBegin()
BATCH_BEGIN
event from the underlying data set.
This method is meant to be overridden in subclasses. The default
implementation here calls startBatch()
.
public void noteBatchEnd()
BATCH_END
event from the underlying data set.
This method is meant to be overridden in subclasses. The default
implementation here calls endBatch()
.
public void noteBeforeDataChanged(int firstIdx, int lastIdx)
BEFORE_DATA_CHANGED
event from the underlying
data set.
This method is meant to be overridden in subclasses. The default
implementation here calls fireDataChangedEvent
with
an event type BEFORE_DATA_CHANGED
.
firstIdx
- Index of first point that will be modified.lastIdx
- Index of last point that will be modified.public void noteAfterDataChanged(int firstIdx, int lastIdx)
AFTER_DATA_CHANGED
event from the underlying
data set.
This method is meant to be overridden in subclasses. The default
implementation here calls fireDataChangedEvent
with
an event type AFTER_DATA_CHANGED
.
firstIdx
- Index of first point that has been modified.lastIdx
- Index of last point that has been modified.public void noteDataChanged(int firstIdx, int lastIdx)
DATA_CHANGED
event from the underlying data set.
This method is meant to be overridden in subclasses. The default
implementation here calls fireDataChangedEvent
with
an event type DATA_CHANGED
.
firstIdx
- Index of first point that was modified.lastIdx
- Index of last point that was modified.public void noteDataAdded(int firstIdx, int lastIdx)
DATA_ADDED
event from the underlying data set.
This method is meant to be overridden in subclasses. The default
implementation here calls fireDataAddedEvent
.
firstIdx
- Index of first point that was added.lastIdx
- Index of last point that was added.public void noteDataLabelChanged(int firstIdx, int lastIdx)
DATA_LABEL_CHANGED
event from the underlying
data set.
This method is meant to be overridden in subclasses. The default
implementation here calls fireDataChangedEvent
with
an event type DATA_LABEL_CHANGED
.
firstIdx
- Index of first point that was modified.lastIdx
- Index of last point that was modified.public void noteFullUpdate()
FULL_UPDATE
event from the underlying data set.
This method is meant to be overridden in subclasses. The default
implementation here calls fireDataSetContentsEvent
with
an event of type FULL_UPDATE
.
public void noteDataSetPropertyChanged(String propertyName, Object oldValue, Object newValue)
DataSetPropertyEvent
event from the underlying
data set.
This method is meant to be overridden in subclasses. The default implementation here does nothing.
public String getName()
null
name has
been explicitly set. Otherwise returns the name of the underlying data
set.getName
in interface IlvDataSet
getName
in class IlvAbstractDataSet
public void setName(String name)
IlvAbstractDataSet.putProperty(java.lang.Object, java.lang.Object, boolean)
method.setName
in class IlvAbstractDataSet
public IlvDataSet getFilteredDataSet()
public void setFilteredDataSet(IlvDataSet dataSet)
dataSet
- The data set to which this data set shall refer.public void dispose()
Note: After calling this function, this data set is no longer functional.
public void disconnect()
Note: After calling this function, and after some changes occurred in the underlying data set, this data set is no longer functional.
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.