net.sf.jga.swing

Class GenericTableModel<T>

public class GenericTableModel<T> extends AbstractTableModel

TableModel that uses a pair of lists: one containing a list of objects representing the rows in the table and one containing a list of functors that will be used to determine the value for each column.

Copyright © 2002 David A. Hall

Author: David A. Hall

Nested Class Summary
static classGenericTableModel.Column<R,C>
Constructor Summary
GenericTableModel(List<T> values, List<Column<T,? extends Object>> columns)
Method Summary
intgetColumnCount()
intgetRowCount()
ObjectgetValueAt(int row, int col)
booleanisCellEditable(int row, int col)
voidsetValueAt(Object value, int row, int col)

Constructor Detail

GenericTableModel

public GenericTableModel(List<T> values, List<Column<T,? extends Object>> columns)

Method Detail

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public Object getValueAt(int row, int col)

isCellEditable

public boolean isCellEditable(int row, int col)

setValueAt

public void setValueAt(Object value, int row, int col)