Package com.lowagie.rups.view.models
Class JTableAutoModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- com.lowagie.rups.view.models.JTableAutoModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class JTableAutoModel extends javax.swing.table.AbstractTableModel
A reusable TableModel class for tables that implement the JTableAutoModelInterface.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
The serial version uid.protected JTableAutoModelInterface
table
The table that knows how to model itself.
-
Constructor Summary
Constructors Constructor Description JTableAutoModel(JTableAutoModelInterface table)
Constructs an auto model for a JTable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnCount()
java.lang.String
getColumnName(int columnIndex)
int
getRowCount()
java.lang.Object
getValueAt(int rowIndex, int columnIndex)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serial version uid.- See Also:
- Constant Field Values
-
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:
TableModel.getColumnCount()
-
getRowCount
public int getRowCount()
- Returns:
- int the number of rows
- See Also:
TableModel.getRowCount()
-
getColumnName
public java.lang.String getColumnName(int columnIndex)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
- Parameters:
columnIndex
- a column number.- Returns:
- the name of the column
- See Also:
AbstractTableModel.getColumnName(int)
-
getValueAt
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
- Parameters:
rowIndex
- int a row numbercolumnIndex
- int a column number- Returns:
- Object an object corresponding with a cell in the table
- See Also:
TableModel.getValueAt(int, int)
-
-