Class ColorAndLetterTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.pentaho.reporting.engine.classic.demo.ancient.demo.groups.ColorAndLetterTableModel
-
- All Implemented Interfaces:
Serializable
,TableModel
public class ColorAndLetterTableModel extends AbstractTableModel
A sample data source for the JFreeReport Demo Application.- Author:
- David Gilbert
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description ColorAndLetterTableModel()
ColorAndLetterTableModel(int size)
Default constructor - builds a sample data source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
getColumnClass(int column)
Returns the class of the data in the specified column.int
getColumnCount()
Returns the number of columns in the table model.String
getColumnName(int column)
Returns the name of the specified column.int
getRowCount()
Returns the number of rows in the table model.Object
getValueAt(int row, int column)
Returns the data value at the specified row and column.-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Method Detail
-
getRowCount
public int getRowCount()
Returns the number of rows in the table model.- Returns:
- the row count.
-
getColumnCount
public int getColumnCount()
Returns the number of columns in the table model.- Returns:
- the column count.
-
getColumnClass
public Class getColumnClass(int column)
Returns the class of the data in the specified column.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Parameters:
column
- the column (zero-based index).- Returns:
- the column class.
-
getColumnName
public String getColumnName(int column)
Returns the name of the specified column.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
column
- the column (zero-based index).- Returns:
- the column name.
-
getValueAt
public Object getValueAt(int row, int column)
Returns the data value at the specified row and column.- Parameters:
row
- the row index (zero based).column
- the column index (zero based).- Returns:
- the value.
-
-