|
|||||||||
| 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()
Deprecated. As of release 1.3, replaced by getManualMaximumY() |
java.lang.Number |
getManualMaximumValue()
Deprecated. As of release 1.3, replaced by getManualMaximumX() |
java.lang.Number |
getManualMaximumX()
Returns the maximum manual x-axis scale |
java.lang.Number |
getManualMaximumY()
Returns the maximum manual y-axis scale |
double |
getManualMinimumColumnValue()
Deprecated. As of release 1.3, replaced by getManualMinimumY() |
java.lang.Number |
getManualMinimumValue()
Deprecated. As of release 1.3, replaced by getManualMinimumY() |
java.lang.Number |
getManualMinimumX()
Returns the minimum manual x-axis scale |
java.lang.Number |
getManualMinimumY()
Returns the minimum manual y-axis scale |
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)
Deprecated. As of release 1.3, replaced by #setMinumumX() |
void |
setMaximumValue(java.lang.Number n)
Deprecated. As of release 1.3, replaced by #setMaximumY() |
void |
setMaximumValueX(java.lang.Number n)
Sets the maximum x-axis value. |
void |
setMaximumValueY(java.lang.Number n)
Sets the maximum y-axis value. |
void |
setMinimumColumnValue(double d)
Deprecated. As of release 1.3, replaced by #setMinimumX() |
void |
setMinimumValue(java.lang.Number n)
Deprecated. As of release 1.3, replaced by #setMinimumY() |
void |
setMinimumValueX(java.lang.Number n)
Sets the minimum x-axis value. |
void |
setMinimumValueY(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)
#setMinumumX()
void setMinimumColumnValue(double d)
#setMinimumX()
void setMaximumValue(java.lang.Number n)
#setMaximumY()
void setMinimumValue(java.lang.Number n)
#setMinimumY()
void setMaximumValueY(java.lang.Number n)
n - the new maximum y valuevoid setMinimumValueX(java.lang.Number n)
n - the new minimum x valuevoid setMaximumValueX(java.lang.Number n)
n - the new maximum x valuevoid setMinimumValueY(java.lang.Number n)
n - the new minimum y valuejava.lang.Number getManualMinimumX()
java.lang.Number getManualMaximumX()
java.lang.Number getManualMinimumY()
java.lang.Number getManualMaximumY()
double getManualMaximumColumnValue()
getManualMaximumY()
double getManualMinimumColumnValue()
getManualMinimumY()
java.lang.Number getManualMaximumValue()
getManualMaximumX()
java.lang.Number getManualMinimumValue()
getManualMinimumY()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||