- java.lang.Object
-
- eu.ess.xaos.ui.plot.DensityChartFX.AbstractData<X,Y>
-
- eu.ess.xaos.ui.plot.DensityChartFX.DefaultData<X,Y>
-
- Type Parameters:
X
- Type of X coordinate.Y
- Type of Y coordinate.
- All Implemented Interfaces:
DensityChartFX.Data<X,Y>
,Observable
- Enclosing class:
- DensityChartFX<X,Y>
public static class DensityChartFX.DefaultData<X,Y> extends DensityChartFX.AbstractData<X,Y>
DensityChartFX.Data
implementation based on arrays.
-
-
Constructor Summary
Constructors Constructor Description DefaultData(X[] xValues, Y[] yValues, double[][] zValues)
Creates new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getXSize()
Size of the data along X axis.X
getXValue(int xIndex)
Returns X coordinate at given index.int
getYSize()
Size of the data along Y axis.Y
getYValue(int yIndex)
Returns Y coordinate at given index.double
getZValue(int xIndex, int yIndex)
Returns the Z value for given X and Y coordinate index.void
set(X[] xValues, Y[] yValues, double[][] zValues)
Sets the data.-
Methods inherited from class eu.ess.xaos.ui.plot.DensityChartFX.AbstractData
addListener, fireInvalidated, removeListener
-
-
-
-
Constructor Detail
-
DefaultData
public DefaultData(X[] xValues, Y[] yValues, double[][] zValues)
Creates new instance.- Parameters:
xValues
- X coordinates.yValues
- Y coordinates.zValues
- Z values.- See Also:
set(Object[], Object[], double[][])
-
-
Method Detail
-
getXSize
public final int getXSize()
Description copied from interface:DensityChartFX.Data
Size of the data along X axis.- Returns:
- Number of X coordinates.
-
getXValue
public final X getXValue(int xIndex)
Description copied from interface:DensityChartFX.Data
Returns X coordinate at given index.- Parameters:
xIndex
- Index of the X coordinate.- Returns:
- X coordinate.
- See Also:
DensityChartFX.Data.getXSize()
-
getYSize
public final int getYSize()
Description copied from interface:DensityChartFX.Data
Size of the data along Y axis.- Returns:
- Number of Y coordinates.
-
getYValue
public final Y getYValue(int yIndex)
Description copied from interface:DensityChartFX.Data
Returns Y coordinate at given index.- Parameters:
yIndex
- Index of the Y coordinate.- Returns:
- Y coordinate.
- See Also:
DensityChartFX.Data.getYSize()
-
getZValue
public final double getZValue(int xIndex, int yIndex)
Description copied from interface:DensityChartFX.Data
Returns the Z value for given X and Y coordinate index.- Parameters:
xIndex
- Index of the X coordinate.yIndex
- Index of the Y coordinate.- Returns:
- the value
-
set
public final void set(X[] xValues, Y[] yValues, double[][] zValues)
Sets the data.- Parameters:
xValues
- X coordinates.yValues
- Y coordinates.zValues
- Z values where first dimension should be equal to x coordinates length and second dimension to the y coordinates length. The value at [0, 0] index corresponds to the bottom-left corner of the chart.
-
-