com.lowagie.rups.view.models

Class JTableAutoModel

public class JTableAutoModel extends AbstractTableModel

A reusable TableModel class for tables that implement the JTableAutoModelInterface.
Field Summary
static longserialVersionUID
The serial version uid.
protected JTableAutoModelInterfacetable
The table that knows how to model itself.
Constructor Summary
JTableAutoModel(JTableAutoModelInterface table)
Constructs an auto model for a JTable.
Method Summary
intgetColumnCount()
StringgetColumnName(int columnIndex)
intgetRowCount()
ObjectgetValueAt(int rowIndex, int columnIndex)

Field Detail

serialVersionUID

private static final long serialVersionUID
The serial version uid.

table

protected JTableAutoModelInterface table
The table that knows how to model itself.

Constructor Detail

JTableAutoModel

public JTableAutoModel(JTableAutoModelInterface table)
Constructs an auto model for a JTable.

Parameters: table a JTable that knows information about its model.

Method Detail

getColumnCount

public int getColumnCount()

Returns: int the number of columns

See Also: javax.swing.table.TableModel#getColumnCount()

getColumnName

public String getColumnName(int columnIndex)

Parameters: columnIndex a column number.

Returns: the name of the column

See Also: javax.swing.table.AbstractTableModel#getColumnName(int)

getRowCount

public int getRowCount()

Returns: int the number of rows

See Also: javax.swing.table.TableModel#getRowCount()

getValueAt

public Object getValueAt(int rowIndex, int columnIndex)

Parameters: rowIndex int a row number columnIndex int a column number

Returns: Object an object corresponding with a cell in the table

See Also: javax.swing.table.TableModel#getValueAt(int, int)