com.klg.jclass.chart3d.data
Class JCEditable3dPointDataSource
java.lang.Object
|
+--com.klg.jclass.chart3d.event.Chart3dDataSupport
|
+--com.klg.jclass.chart3d.data.Base3dDataSource
|
+--com.klg.jclass.chart3d.data.Base3dPointDataSource
|
+--com.klg.jclass.chart3d.data.JCDefault3dPointDataSource
|
+--com.klg.jclass.chart3d.data.JCEditable3dPointDataSource
- All Implemented Interfaces:
- Chart3dDataManager, Chart3dDataModel, Chart3dPointDataModel, Cloneable, EditableChart3dDataModel, HoleValueChart3dDataModel, LabelledChart3dDataModel, LabelledChart3dPointDataModel, Serializable
- public class JCEditable3dPointDataSource
- extends JCDefault3dPointDataSource
- implements EditableChart3dDataModel
Extension to JCDefault3dPointDataSource
with convenience
methods that permit editing of data.
- See Also:
- Serialized Form
Method Summary |
Point3d |
getPoint(int seriesIndex,
int pointIndex)
Retrieves the specified point object, given series and point indices. |
double |
getZValue(com.klg.jclass.chart3d.JCData3dIndex index)
Retrieves the zValue from the specified
JCData3dPointIndex object. |
boolean |
setPoint(int seriesIndex,
int pointIndex,
Point3d point)
Sets the point for a given series and point index. |
boolean |
setZValue(com.klg.jclass.chart3d.JCData3dIndex index,
double newValue)
Sets the zValue of a point for a given series and point index. |
JCEditable3dPointDataSource
public JCEditable3dPointDataSource()
- No argument constructor which sets all params to null.
JCEditable3dPointDataSource
public JCEditable3dPointDataSource(String name,
Point3d[][] points)
- Regular constructor sets the data values and the name of this datasource.
- Parameters:
name
- String name of the datasourcepoints
- array of Point3d
objects to be plotted on the
chart
getPoint
public Point3d getPoint(int seriesIndex,
int pointIndex)
- Retrieves the specified point object, given series and point indices.
- Parameters:
seriesIndex
- int indicating which series contains the pointpointIndex
- int indicating where in the series the point is
- Returns:
- the
Point3d
object at that location
setPoint
public boolean setPoint(int seriesIndex,
int pointIndex,
Point3d point)
- Sets the point for a given series and point index.
- Parameters:
seriesIndex
- int indicating which series contains the pointpointIndex
- int indicating where in the series the point ispoint
- the new Point3d
object
- Returns:
- whether the edit succeeded
getZValue
public double getZValue(com.klg.jclass.chart3d.JCData3dIndex index)
- Retrieves the
zValue
from the specified
JCData3dPointIndex
object.
- Parameters:
index
- the JCData3dPointIndex
- Returns:
- the
Point3d
object at that location
setZValue
public boolean setZValue(com.klg.jclass.chart3d.JCData3dIndex index,
double newValue)
- Sets the
zValue
of a point for a given series and point index. This
series and point index is retrieved from the passed in data index,
which must be of type JCData3dPointIndex
.
- Specified by:
setZValue
in interface EditableChart3dDataModel
- Parameters:
index
- the data index from which the series and point indices of the
point to be edited is obtainednewValue
- Point3d
object for that position
- Returns:
- whether the edit succeeded