|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ChartDataModel
This interface defines the methods to access chart data. It has to deal with several difficulties. The model is basically resembling a Swing table model. Furthermore, in the implementation it needs to be defined whether the datasets are organized in rows or in columns, whether the x-axis values are numeric etc. In order to layout certain components, there must be methods to return the maximum and minimum values.
A DataSet is a series of figures belonging together, whereas a column is the value printed at the x-axis. They can be rendered using specific Format classes.
| Method Summary | |
|---|---|
void |
addChartDataModelListener(ChartDataModelListener l)
Adds a ChartDataModelListener |
int |
getAxisBinding(int set)
Returns the Axis binding of a specific DataSet. |
ChartDataModelConstraints |
getChartDataModelConstraints(int axis)
Returns a ChartDataModelConstraints object for the given axis binding. |
java.lang.Class |
getColumnClass()
Returns the class of the columns. |
java.lang.Object |
getColumnValueAt(int col)
Returns a specific column value. |
java.lang.Object |
getColumnValueAt(int set,
int col)
Returns a specific column value. |
int |
getDataSetLength(int set)
Returns the length of a certain dataset. |
java.lang.String |
getDataSetName(int set)
Returns the title of the DataSet used for rendering the Legend. |
int |
getDataSetNumber()
Returns the total amount of datasets. |
double |
getManualMaximumColumnValue()
Returns the current maximum x-axis value used for manual scaling. |
java.lang.Number |
getManualMaximumValue()
Returns the current maximum y-axis value used for manual scaling. |
double |
getManualMinimumColumnValue()
Returns the current minimum x-axis value used for manual scaling. |
java.lang.Number |
getManualMinimumValue()
Returns the current minimum y-axis value used for manual scaling. |
java.lang.Number |
getValueAt(int set,
int index)
Returns the Value in a specific dataset at a certain index. |
boolean |
isAutoScale()
Returns true if autoscaling is enabled. |
boolean |
isColumnNumeric()
Defines whether the column values are numeric, that is, they can be casted to Number. |
boolean |
isManualScale()
Returns true if the manual axis scaling is enabled. |
void |
removeChartDataModelListener(ChartDataModelListener l)
Removes a ChartDataModelListener |
void |
setAutoScale(boolean b)
Enables or disables chart autoscaling. |
void |
setAxisBinding(int set,
int axis)
Sets the Axis binding of a DataSet. |
void |
setChartDataModelConstraints(int axis,
ChartDataModelConstraints constraints)
Sets the ChartDataModelConstraints object for the given axis binding. |
void |
setManualScale(boolean b)
Enables the manual axis scaling. |
void |
setMaximumColumnValue(double d)
Sets the maximum x-axis value. |
void |
setMaximumValue(java.lang.Number n)
Sets the maximum y-axis value. |
void |
setMinimumColumnValue(double d)
Sets the minimum x-axis value. |
void |
setMinimumValue(java.lang.Number n)
Sets the minimum y-axis value. |
void |
setValueAt(int set,
int index,
java.lang.Object value)
Sets the value in a specific dataset at the given index. |
| Method Detail |
|---|
int getDataSetNumber()
int getAxisBinding(int set)
set - the DataSet index
void setAxisBinding(int set,
int axis)
set - the DataSet indexaxis - the Axis binding constantint getDataSetLength(int set)
set - the DataSet index
java.lang.String getDataSetName(int set)
set - the DataSet index
java.lang.Number getValueAt(int set,
int index)
set - the DataSet indexindex - the value index in the DataSet
void setValueAt(int set,
int index,
java.lang.Object value)
set - the DataSet indexindex - the value index in the DataSetvalue - the value to be storedjava.lang.Class getColumnClass()
java.lang.Object getColumnValueAt(int col)
col - the column index
java.lang.Object getColumnValueAt(int set,
int col)
set - the data set indexcol - the column index
boolean isColumnNumeric()
Number.
true if the column value can be
safely casted to Number type.void addChartDataModelListener(ChartDataModelListener l)
l - the ChartDataModelListenervoid removeChartDataModelListener(ChartDataModelListener l)
l - the ChartDataModelListenerChartDataModelConstraints getChartDataModelConstraints(int axis)
axis - the Axis constant
void setChartDataModelConstraints(int axis,
ChartDataModelConstraints constraints)
axis - the Axis constantconstraints - the ChartDataModelConstraints objectvoid setAutoScale(boolean b)
b - true to enable autoscaling, false otherwiseboolean isAutoScale()
void setManualScale(boolean b)
boolean isManualScale()
void setMaximumColumnValue(double d)
void setMinimumColumnValue(double d)
void setMaximumValue(java.lang.Number n)
void setMinimumValue(java.lang.Number n)
double getManualMaximumColumnValue()
double getManualMinimumColumnValue()
java.lang.Number getManualMaximumValue()
java.lang.Number getManualMinimumValue()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||