Class CSVTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.jfree.report.modules.misc.tablemodel.CSVTableModel
- All Implemented Interfaces:
Serializable
,TableModel
TableModel
used by the CSVTableModelProducer
class. It has a
feature which generates the column name if it is not know.- Author:
- Mimil
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Counts columns of thisTableModel
.getColumnName
(int column) Return the column name at a specified position.String[]
Object[][]
getData()
int
int
Counts rows of thisTableModel
.getValueAt
(int rowIndex, int columnIndex) Gets the Object at specified row and column positions.void
setColumnNames
(String[] columnNames) void
void
setMaxColumnCount
(int maxColumnCount) Sets the maximum column count if it is bigger than the current one.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
CSVTableModel
public CSVTableModel()
-
-
Method Details
-
getData
-
setData
-
getColumnNames
-
setColumnNames
-
getColumnCount
public int getColumnCount()Counts columns of thisTableModel
.- Returns:
- the column count
-
getRowCount
public int getRowCount()Counts rows of thisTableModel
.- Returns:
- the row count
-
getValueAt
Gets the Object at specified row and column positions.- Parameters:
rowIndex
- row indexcolumnIndex
- column index- Returns:
- The requested Object
-
setMaxColumnCount
public void setMaxColumnCount(int maxColumnCount) Sets the maximum column count if it is bigger than the current one.- Parameters:
maxColumnCount
-
-
getMaxColumnCount
public int getMaxColumnCount() -
getColumnName
Return the column name at a specified position.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
column
- column index- Returns:
- the column name
-