com.klg.jclass.chart3d.data
Class JCEditable3dGridDataSource
java.lang.Object
|
+--com.klg.jclass.chart3d.event.Chart3dDataSupport
|
+--com.klg.jclass.chart3d.data.Base3dDataSource
|
+--com.klg.jclass.chart3d.data.Base3dGridDataSource
|
+--com.klg.jclass.chart3d.data.JCDefault3dGridDataSource
|
+--com.klg.jclass.chart3d.data.JCEditable3dGridDataSource
- All Implemented Interfaces:
- Chart3dDataManager, Chart3dDataModel, Chart3dGridDataModel, Cloneable, EditableChart3dDataModel, HoleValueChart3dDataModel, LabelledChart3dDataModel, LabelledChart3dGridDataModel, Serializable
- Direct Known Subclasses:
- JCSwing3dDataSource
- public class JCEditable3dGridDataSource
- extends JCDefault3dGridDataSource
- implements EditableChart3dDataModel
Extension to JCDefault3dGridDataSource
with convenience methods
that permit editing of data.
- See Also:
- Serialized Form
Method Summary |
double |
getZValue(int xIndex,
int yIndex)
Retrieves the specified point value, given series and point indices. |
double |
getZValue(com.klg.jclass.chart3d.JCData3dIndex index)
Retrieves the zValue based on the JCData3dIndex
object. |
boolean |
setZValue(int xIndex,
int yIndex,
double newValue)
Sets the value for a location given the x and y indices. |
boolean |
setZValue(com.klg.jclass.chart3d.JCData3dIndex index,
double newValue)
Sets the point for a given data index which must be of type
JCData3dGridIndex . |
Methods inherited from class com.klg.jclass.chart3d.data.Base3dGridDataSource |
clone, getDataSourceName, getNumX, getNumY, getXGrid, getXLabels, getYGrid, getYLabels, getZValues, setDataSourceName, setXGrid, setXLabels, setYGrid, setYLabels, setZValues |
JCEditable3dGridDataSource
public JCEditable3dGridDataSource()
- No argument constructor which sets all params to null.
JCEditable3dGridDataSource
public JCEditable3dGridDataSource(String name,
double[] xGrid,
double[] yGrid,
double[][] zValues)
- Constructor that creates a populated
JCEditable3dGridDataSource
.
- Parameters:
name
- String name of the datasourcexGrid
- array of doubles which holds the X valuesyGrid
- array of doubles which holds the Y valueszValues
- two-dimensional array of doubles holds the Z values
getZValue
public double getZValue(int xIndex,
int yIndex)
- Retrieves the specified point value, given series and point indices.
- Parameters:
xIndex
- int indicating which series contains the pointyIndex
- int indicating where in the series the point is
- Returns:
- the value of that point as a double
getZValue
public double getZValue(com.klg.jclass.chart3d.JCData3dIndex index)
- Retrieves the
zValue
based on the JCData3dIndex
object.
- Parameters:
index
- a JCData3dGridIndex
object
- Returns:
- the double value at that location
setZValue
public boolean setZValue(com.klg.jclass.chart3d.JCData3dIndex index,
double newValue)
- Sets the point for a given data index which must be of type
JCData3dGridIndex
.
- Specified by:
setZValue
in interface EditableChart3dDataModel
- Parameters:
index
- the data index from which the x and y indices of the point
to be edited is obtainednewValue
- the new z value for the point
- Returns:
- whether the edit succeeded
setZValue
public boolean setZValue(int xIndex,
int yIndex,
double newValue)
- Sets the value for a location given the x and y indices.
- Parameters:
xIndex
- the X locationyIndex
- the Y locationnewValue
- the new z value for the point
- Returns:
- whether the edit succeeded