org.jfree.report.modules.misc.tablemodel

Class CSVTableModel

public class CSVTableModel extends AbstractTableModel

TableModel used by the CSVTableModelProducer class. It has a feature which generates the column name if it is not know.

Author: Mimil

See Also: this.getColumnName()

Constructor Summary
CSVTableModel()
Method Summary
intgetColumnCount()
Counts columns of this TableModel.
StringgetColumnName(int column)
Return the column name at a specified position.
String[]getColumnNames()
Object[][]getData()
intgetMaxColumnCount()
intgetRowCount()
Counts rows of this TableModel.
ObjectgetValueAt(int rowIndex, int columnIndex)
Gets the Object at specified row and column positions.
voidsetColumnNames(String[] columnNames)
voidsetData(Object[][] data)
voidsetMaxColumnCount(int maxColumnCount)
Sets the maximum column count if it is bigger than the current one.

Constructor Detail

CSVTableModel

public CSVTableModel()

Method Detail

getColumnCount

public int getColumnCount()
Counts columns of this TableModel.

Returns: the column count

getColumnName

public String getColumnName(int column)
Return the column name at a specified position.

Parameters: column column index

Returns: the column name

getColumnNames

public String[] getColumnNames()

getData

public Object[][] getData()

getMaxColumnCount

public int getMaxColumnCount()

getRowCount

public int getRowCount()
Counts rows of this TableModel.

Returns: the row count

getValueAt

public Object getValueAt(int rowIndex, int columnIndex)
Gets the Object at specified row and column positions.

Parameters: rowIndex row index columnIndex column index

Returns: The requested Object

setColumnNames

public void setColumnNames(String[] columnNames)

setData

public void setData(Object[][] data)

setMaxColumnCount

public void setMaxColumnCount(int maxColumnCount)
Sets the maximum column count if it is bigger than the current one.

Parameters: maxColumnCount