|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Data source for all types of charts. The chat model is similar to a matrix that has rows and columns. Rows and columns are symmetric. Nevertheless, in the default implementations, the row names are used for the scale and the column names for the legend. If you have an implementation of a chart model and you want to switch the rows with the columns, simply implement an adapter that wraps the given model.
Method Summary | |
void |
addChartModelListener(ChartModelListener listener)
Adds a chart model listener to the list of listeners. |
int |
getColumnCount()
Returns the number of columns in this model. |
int |
getRowCount()
Returns the number of rows in this model. |
java.lang.String |
getTextAt(int rowIndex,
int columnIndex)
Returns the text or name of a cell at a given index. |
java.lang.String |
getTextForColumn(int columnIndex)
Returns the text or name of a column. |
java.lang.String |
getTextForKey(java.lang.String key)
Provides further arbitrary text values that can be used to specify the title of the chart or the names of the axis. |
java.lang.String |
getTextForRow(int rowIndex)
Returns the text or name of a row. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the data value of a cell at the given index. |
void |
removeChartModelListener(ChartModelListener listener)
Removes a chart model listener from the list of listeners. |
Method Detail |
public int getRowCount()
public int getColumnCount()
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
java.lang.Number
.
rowIndex
- The index of the row of the underlying cell.columnIndex
- The index of the column of the underlying cell.
public java.lang.String getTextAt(int rowIndex, int columnIndex)
rowIndex
- The index of the row of the underlying cell.columnIndex
- The index of the column of the underlying cell.
public java.lang.String getTextForRow(int rowIndex)
rowIndex
- The index of the row of the underlying cell.
public java.lang.String getTextForColumn(int columnIndex)
columnIndex
- The index of the column of the underlying cell.
public java.lang.String getTextForKey(java.lang.String key)
key
- The key or name of the text. There are no predefined values.
public void addChartModelListener(ChartModelListener listener)
public void removeChartModelListener(ChartModelListener listener)
listener
- A listener that has been added.
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |