Package ball.swing.table
Class ListTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- ball.swing.table.AbstractTableModelImpl
-
- ball.swing.table.ArrayListTableModel<Object>
-
- ball.swing.table.ListTableModel
-
- All Implemented Interfaces:
Serializable
,EventListener
,TableModelListener
,TableModel
public class ListTableModel extends ArrayListTableModel<Object>
List
TableModel
implementation.- Author:
- Allen D. Ball
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description ListTableModel(List<?> list)
ListTableModel(List<?> list, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
getValueAt(Object row, int x)
Implementation method to retrieve a column value from a row object.void
tableChanged(TableModelEvent event)
-
Methods inherited from class ball.swing.table.ArrayListTableModel
getRowCount, getValueAt, list
-
Methods inherited from class ball.swing.table.AbstractTableModelImpl
column, getColumnClass, getColumnCount, getColumnName, header, isCellEditable, row, setColumnClass, setColumnName, setValueAt
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Constructor Detail
-
ListTableModel
public ListTableModel(List<?> list, String name)
- Parameters:
list
- The underlyingList
.name
- The column name.- See Also:
AbstractTableModelImpl(String...)
-
ListTableModel
public ListTableModel(List<?> list)
- Parameters:
list
- The underlyingList
.- See Also:
AbstractTableModelImpl(int)
-
-
Method Detail
-
getValueAt
protected Object getValueAt(Object row, int x)
Description copied from class:ArrayListTableModel
Implementation method to retrieve a column value from a row object.- Specified by:
getValueAt
in classArrayListTableModel<Object>
- Parameters:
row
- TheObject
representing the row.x
- The column index.- Returns:
- The column value from the row.
-
tableChanged
public void tableChanged(TableModelEvent event)
- Specified by:
tableChanged
in interfaceTableModelListener
- Overrides:
tableChanged
in classAbstractTableModelImpl
-
-