public class IlvLODDataSet extends IlvAbstractDataSet
The IlvLODDataSet
is a data set implementation controlled by an
IlvDataTileController
. When an IlvLODDataSet
is
connected to a chart, the changes on the visible range of its x-axis trigger
a loading request.
Note: Instances of this data set class cannot be serialized and deserialized,
despite implementing the Serializable
interface.
DEFAULT_UNDEF_VALUE
Constructor and Description |
---|
IlvLODDataSet(IlvDataTileController controller)
Initializes a new load-on-demand data set with the
specified controller.
|
Modifier and Type | Method and Description |
---|---|
protected void |
axisRangeChanged(IlvAxis axis)
Invoked when the visible range of a chart displaying this data set
changes.
|
protected void |
computeLimits(IlvDataInterval xRange,
IlvDataInterval yRange)
Computes the limits of the values stored in this data set.
|
IlvDataTileController |
getController()
Returns the controller that manages the data tiles.
|
IlvDataPoints |
getDataBetween(int iMin,
int iMax)
Returns the data points between the two specified indices.
|
int |
getDataCount()
Returns an upper bound for the number of data points available at this
moment.
|
IlvDataPoints |
getDataInside(IlvDataWindow window,
int adjCount,
boolean continuous)
Returns the data points inside the specified data window.
|
IlvStyle |
getLoadingStyle()
Returns the rendering style used to display the loading of data tiles.
|
String |
getLoadingText()
Returns the text displayed while loading data tiles.
|
double |
getXData(int idx)
Returns the x-value of the data point at the specified index.
|
double |
getYData(int idx)
Returns the x-value of the data point at the specified index.
|
boolean |
isShowingLoading()
Indicates whether the loading of data tiles is displayed.
|
void |
setLoadingStyle(IlvStyle style)
Sets the rendering style used to display the loading of data tiles.
|
void |
setLoadingText(String text)
Sets the text displayed while loading data tiles.
|
void |
showLoading(boolean show)
Specifies whether the loading of data tiles should be displayed.
|
addData, addDataSetListener, computeMinimumXDifference, dataAdded, dataChanged, endBatch, fireDataAddedEvent, fireDataChangedEvent, fireDataSetContentsEvent, fireDataSetPropertyEvent, getData, getDataInside, getDataLabel, getMinimumXDifference, getName, getProperty, getUndefValue, getXRange, getXRange, getYRange, getYRange, invalidateLimits, invalidateLimits, invalidateLimits, isBatched, isEditable, isXRangeIncludingUndefinedPoints, isXValuesSorted, putProperty, removeDataSetListener, setData, setLimitsValid, setName, setUndefValue, setXRangeIncludingUndefinedPoints, startBatch, toString
public IlvLODDataSet(IlvDataTileController controller)
IllegalArgumentException
- If the controller is null
or if it
already controls another data set.public int getDataCount()
getDataCount
in interface IlvDataSet
getDataCount
in class IlvAbstractDataSet
public double getXData(int idx)
The tile capacity specified when creating the tile controller is used to compute an absolute indexing of data points.
getXData
in interface IlvDataSet
getXData
in class IlvAbstractDataSet
idx
- a data point index, >= 0, < getDataCount()
public double getYData(int idx)
The tile capacity specified when creating the tile controller is used to compute an absolute indexing of data points.
getYData
in interface IlvDataSet
getYData
in class IlvAbstractDataSet
idx
- a data point index, >= 0, < getDataCount()
public IlvDataPoints getDataBetween(int iMin, int iMax)
Note: The number of resulting points can be less than
iMax-iMin+1
.
getDataBetween
in interface IlvDataSet
getDataBetween
in class IlvAbstractDataSet
iMin
- a data point index, >= 0, < getDataCount()
iMax
- a data point index, >= iMin, < getDataCount()
IlvDataPoints
representing the requested points.
May return null
if there are no such points.
Returns null
if iMin > iMax.public IlvDataPoints getDataInside(IlvDataWindow window, int adjCount, boolean continuous)
Warning: this method does not trigger a loading request. Instead it returns the contents of the loaded tiles that are within the specified window.
getDataInside
in interface IlvDataSet
getDataInside
in class IlvAbstractDataSet
window
- The considered data window.adjCount
- The number of data points immediately outside the
data window that must be returned by the request. If this parameter
is equal to 0
, only the points within the data window are
returned. A value that is not equal to 0
is only relevant
when requesting a continuous set of points (see the meaning of the
continuous
parameter).continuous
- Indicates whether the indices of the returned point
set may have holes or not. If false
, only data points
inside the given data window are returned, and possibly
adjCount data points on each side, even if the resulting
set of indices has holes, like for example
[1 2 4 7]
. If true
, a set of data points
with continuous indices is returned, even if some of them lie outside
the given data window, for example [1 2 3 4 5 6 7]
.IlvDataPoints
representing the requested points.
May return null
if there are no such points.IlvDataTileController.requestLoading(ilog.views.chart.IlvDataInterval, java.lang.Object)
protected void computeLimits(IlvDataInterval xRange, IlvDataInterval yRange)
computeLimits
in class IlvAbstractDataSet
xRange
- Returns the x-values range.yRange
- Returns the y-values range.IlvDataTileLoader.getXRange()
,
IlvDataTileLoader.getYRange()
public final IlvDataTileController getController()
public final boolean isShowingLoading()
showLoading(boolean)
public void showLoading(boolean show)
show
- If true
, the charts that represent the
data set will display the loading of data tiles. In that case, the display
is done with an instance of
IlvDataIndicator
.
The default value of this property is false
, which means
that no graphical feedback is displayed while loading tiles.setLoadingStyle(ilog.views.chart.IlvStyle)
,
setLoadingText(java.lang.String)
public final IlvStyle getLoadingStyle()
public void setLoadingStyle(IlvStyle style)
showLoading(boolean)
public final String getLoadingText()
setLoadingText(java.lang.String)
public void setLoadingText(String text)
showLoading(boolean)
protected void axisRangeChanged(IlvAxis axis)
The default implementation calls the
IlvDataTileController.requestLoading(ilog.views.chart.IlvDataInterval, java.lang.Object)
method, using the new visible
range and the axis as parameters. You can override this implementation to
load more data (for example, expand the visible range by a given factor).
axis
- The considered x-axis.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.