com.klg.jclass.chart.data
Class JCEditableDataSource
java.lang.Object
|
+--com.klg.jclass.chart.ChartDataSupport
|
+--com.klg.jclass.chart.data.BaseDataSource
|
+--com.klg.jclass.chart.data.JCDefaultDataSource
|
+--com.klg.jclass.chart.data.JCEditableDataSource
- All Implemented Interfaces:
- ChartDataManageable, ChartDataManager, ChartDataModel, EditableChartDataModel, HoleValueChartDataModel, com.klg.jclass.chart.ImageMapChartDataModel, LabelledChartDataModel, Serializable
- public class JCEditableDataSource
- extends JCDefaultDataSource
- implements EditableChartDataModel
A quick and easy default editable data source. It inherits the vast
majority of it's behavior from JCDefaultDataSource
. It
implements the EditableChartDataModel
interface to
update the Y-values array with the edited value.
- See Also:
- Serialized Form
Fields inherited from class com.klg.jclass.chart.data.BaseDataSource |
cloneArrays, clusterImageMapInfo, holeValue, legendImageMapInfo, name, pointImageMapInfo, pointLabels, seriesImageMapInfo, seriesLabels, xvalues, yvalues |
Constructor Summary |
JCEditableDataSource()
The default constructor. |
JCEditableDataSource(double[][] xvalues,
double[][] yvalues,
String[] pointLabels,
String[] seriesLabels,
String dataSourceName)
Creates a data source using the provided data. |
JCEditableDataSource(double[][] xvalues,
double[][] yvalues,
String[] pointLabels,
String[] seriesLabels,
String dataSourceName,
com.klg.jclass.util.ImageMapInfo[][] pointImageMapInfo,
com.klg.jclass.util.ImageMapInfo[] clusterImageMapInfo,
com.klg.jclass.util.ImageMapInfo[] seriesImageMapInfo,
com.klg.jclass.util.ImageMapInfo[] legendImageMapInfo)
Creates a data source using the provided data. |
JCEditableDataSource(Locale locale)
The default constructor specifying a locale. |
Method Summary |
boolean |
setDataItem(int seriesIndex,
int pointIndex,
double newValue)
Changes the specified Y data value. |
Methods inherited from class com.klg.jclass.chart.data.JCDefaultDataSource |
buildDataSourceString, check, generateLabels, generateLabels, setClusterImageMapInfo, setClusterImageMapInfo, setData, setLegendImageMapInfo, setLegendImageMapInfo, setName, setPointImageMapInfo, setPointImageMapInfo, setPointImageMapInfo, setPointImageMapInfo, setPointLabels, setSeriesImageMapInfo, setSeriesImageMapInfo, setSeriesLabels, setXSeries, setYSeries, updateChart |
Methods inherited from class com.klg.jclass.chart.data.BaseDataSource |
cloneCheck, cloneCheck, cloneCheck, getChartDataManager, getCloneArrays, getClusterImageMapInfo, getDataSourceName, getHoleValue, getLegendImageMapInfo, getNumSeries, getPointImageMapInfo, getPointLabels, getSeriesImageMapInfo, getSeriesLabels, getXSeries, getYSeries, setCloneArrays |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JCEditableDataSource
public JCEditableDataSource()
- The default constructor. Used mostly for the
DataSourceEditor
.
JCEditableDataSource
public JCEditableDataSource(Locale locale)
- The default constructor specifying a locale.
JCEditableDataSource
public JCEditableDataSource(double[][] xvalues,
double[][] yvalues,
String[] pointLabels,
String[] seriesLabels,
String dataSourceName)
- Creates a data source using the provided data.
- Parameters:
xvalues
- X series arrays; can be nullyvalues
- Y series arrays; can be nullpointLabels
- array of point labels; can be nullseriesLabels
- array of series labels; can be nulldataSourceName
- name applied to this data source
JCEditableDataSource
public JCEditableDataSource(double[][] xvalues,
double[][] yvalues,
String[] pointLabels,
String[] seriesLabels,
String dataSourceName,
com.klg.jclass.util.ImageMapInfo[][] pointImageMapInfo,
com.klg.jclass.util.ImageMapInfo[] clusterImageMapInfo,
com.klg.jclass.util.ImageMapInfo[] seriesImageMapInfo,
com.klg.jclass.util.ImageMapInfo[] legendImageMapInfo)
- Creates a data source using the provided data.
- Parameters:
xvalues
- X series arrays; can be nullyvalues
- Y series arrays; can be nullpointLabels
- array of point labels; can be nullseriesLabels
- array of series labels; can be nulldataSourceName
- name to be applied to this data sourcepointImageMapInfo
- An array of image map information, indexed by
series and point.clusterImageMapInfo
- An array of image map information, one for each
point cluster.seriesImageMapInfo
- An array of image map information, one for each
series.legendImageMapInfo
- An array of legend image map information, one for
each series.
setDataItem
public boolean setDataItem(int seriesIndex,
int pointIndex,
double newValue)
- Changes the specified Y data value.
- Specified by:
setDataItem
in interface EditableChartDataModel
- Parameters:
seriesIndex
- series index for the changed pointpointIndex
- point index for the changed pointnewValue
- new y value for the specified point
- Returns:
- boolean value indicating whether the new value was
accepted;
true
means the value was accepted