org.jfree.report.modules.misc.tablemodel

Class PrintableTableModel

Implemented Interfaces:
TableModel

public class PrintableTableModel
extends java.lang.Object
implements TableModel

A tablemodel that allows to override the column names. This is usefull in internationalized environments, where the tablemodel returns diffent columnnames depending on the current locale.
Author:
LordOfCode

Constructor Summary

PrintableTableModel(TableModel source, String[] keys)

Method Summary

void
addTableModelListener(TableModelListener l)
Class
getColumnClass(int columnIndex)
int
getColumnCount()
String
getColumnName(int columnIndex)
Retrieves the internationalized column name from the string array.
int
getRowCount()
Object
getValueAt(int rowIndex, int columnIndex)
boolean
isCellEditable(int rowIndex, int columnIndex)
void
removeTableModelListener(TableModelListener l)
void
setValueAt(Object aValue, int rowIndex, int columnIndex)

Constructor Details

PrintableTableModel

public PrintableTableModel(TableModel source,
                           String[] keys)

Method Details

addTableModelListener

public void addTableModelListener(TableModelListener l)

getColumnClass

public Class getColumnClass(int columnIndex)

getColumnCount

public int getColumnCount()

getColumnName

public String getColumnName(int columnIndex)
Retrieves the internationalized column name from the string array.
See Also:
TableModel.getColumnName(int)

getRowCount

public int getRowCount()

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)

removeTableModelListener

public void removeTableModelListener(TableModelListener l)

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)