ChartCat 1.2

li.netcat.chart
Interface ChartModel

All Known Implementing Classes:
AbstractChartModel

public interface ChartModel

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.

Author:
Arthur Marxer

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

getRowCount

public int getRowCount()
Returns the number of rows in this model.

Returns:
The number of rows in this model. Counting begins as usual with 0.

getColumnCount

public int getColumnCount()
Returns the number of columns in this model.

Returns:
The number of rows in this model. Counting begins as usual with 0.

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Returns the data value of a cell at the given index. For numeric charts, this value is typically an extension of java.lang.Number.

Parameters:
rowIndex - The index of the row of the underlying cell.
columnIndex - The index of the column of the underlying cell.
Returns:
A data value with no further restriction.

getTextAt

public java.lang.String getTextAt(int rowIndex,
                                  int columnIndex)
Returns the text or name of a cell at a given index.

Parameters:
rowIndex - The index of the row of the underlying cell.
columnIndex - The index of the column of the underlying cell.
Returns:
A string value with no further restriction.

getTextForRow

public java.lang.String getTextForRow(int rowIndex)
Returns the text or name of a row. These values are typically used for a scale.

Parameters:
rowIndex - The index of the row of the underlying cell.
Returns:
A string value with no further restriction.

getTextForColumn

public java.lang.String getTextForColumn(int columnIndex)
Returns the text or name of a column. These values are typically used for the legend.

Parameters:
columnIndex - The index of the column of the underlying cell.
Returns:
A string value with no further restriction.

getTextForKey

public 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.

Parameters:
key - The key or name of the text. There are no predefined values.
Returns:
The text for the given key.

addChartModelListener

public void addChartModelListener(ChartModelListener listener)
Adds a chart model listener to the list of listeners. The listeners are notified whenever a value in this model changes.


removeChartModelListener

public void removeChartModelListener(ChartModelListener listener)
Removes a chart model listener from the list of listeners.

Parameters:
listener - A listener that has been added.

ChartCat 1.2

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print