|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.chart.ChartDataSupport | +--com.klg.jclass.chart.data.JCChartSwingDataSource
JCChartSwingDataSource
provides an intepretive layer between
JCChart
and data existing in a Swing TableModel
format.
The most notable differences between them is the inversion of rows and
columns - TableModel
's rows are JCChart
's columns,
and vice versa. Also, TableModel
provides no X values, and so
these are generated here.
Field Summary | |
protected String |
dsName
|
protected String[] |
pLabels
|
protected TableModel |
tableModel
TableModel instance (Swing data source instance). |
Fields inherited from class com.klg.jclass.chart.ChartDataSupport |
source |
Fields inherited from interface com.klg.jclass.chart.ChartDataModel |
ALL |
Constructor Summary | |
JCChartSwingDataSource()
The default constructor. |
|
JCChartSwingDataSource(TableModel model)
Constructor. |
|
JCChartSwingDataSource(TableModel model,
String[] pointLabels,
String dataSourceName)
Constructor. |
Method Summary | |
com.klg.jclass.chart.ChartDataManager |
getChartDataManager()
Retrieves the ChartDataManager instance. |
String |
getDataSourceName()
Name of data source, used at the top of the legend. |
double |
getHoleValue()
Returns the hole value being used for this data source. |
int |
getNumSeries()
Retrieves the number of data series. |
String[] |
getPointLabels()
Point labels can be set manually if desired. |
String[] |
getSeriesLabels()
Gets series labels from TabelModel 's column headers. |
double[] |
getXSeries(int index)
Retrieves the specified x-value series. |
double[] |
getYSeries(int index)
Retrieves the specified y-value series. |
boolean |
setDataItem(int seriesIndex,
int pointIndex,
double newValue)
Sets the value of a single data item in the TableModel . |
void |
setDataSourceName(String name)
Name of data source, used at the top of the legend. |
void |
setPointLabels(String[] labels)
Point labels can be set manually if desired. |
void |
tableChanged(TableModelEvent e)
Implements TableModelListener for changes to
TableModel . |
Methods inherited from class com.klg.jclass.chart.ChartDataSupport |
addChartDataListener, fireChartDataEvent, fireChartDataEvent, removeChartDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TableModel tableModel
protected String[] pLabels
protected String dsName
Constructor Detail |
public JCChartSwingDataSource()
public JCChartSwingDataSource(TableModel model)
model
- The table model on which to base this datasourcepublic JCChartSwingDataSource(TableModel model, String[] pointLabels, String dataSourceName)
model
- The table model on which to base this datasourcepointLabels
- A list of point labels for this data sourcedataSourceName
- The name of this data sourceMethod Detail |
public boolean setDataItem(int seriesIndex, int pointIndex, double newValue)
TableModel
.
setDataItem
in interface EditableChartDataModel
newValue
- The new data item valueseriesIndex
- The series (or column) to changepointIndex
- The point (or row) to change
public double[] getXSeries(int index)
getXSeries
in interface ChartDataModel
index
- data series index
public double[] getYSeries(int index)
getYSeries
in interface ChartDataModel
index
- data series index
public int getNumSeries()
getNumSeries
in interface ChartDataModel
public String[] getPointLabels()
JTable
itself.
getPointLabels
in interface LabelledChartDataModel
LabelledChartDataModel.getPointLabels()
public void setPointLabels(String[] labels)
labels
- A list of point labelsLabelledChartDataModel.getPointLabels()
public String[] getSeriesLabels()
TabelModel
's column headers.
getSeriesLabels
in interface LabelledChartDataModel
LabelledChartDataModel.getSeriesLabels()
public String getDataSourceName()
JTable
itself.
getDataSourceName
in interface LabelledChartDataModel
public void setDataSourceName(String name)
JTable
itself.
name
- The new data source namepublic double getHoleValue()
getHoleValue
in interface HoleValueChartDataModel
public void tableChanged(TableModelEvent e)
TableModelListener
for changes to
TableModel
.
tableChanged
in interface TableModelListener
e
- The event generated by the changepublic com.klg.jclass.chart.ChartDataManager getChartDataManager()
ChartDataManager
instance. Required
by the ChartDataManageable
interface.
getChartDataManager
in interface ChartDataManageable
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |