R
- The type of table row.public abstract class ArrayListTableModel<R> extends AbstractTableModelImpl
TableModel
implementations based on an ArrayList
.listenerList
Modifier | Constructor and Description |
---|---|
protected |
ArrayListTableModel(Iterable<? extends R> iterable,
int columns) |
protected |
ArrayListTableModel(Iterable<? extends R> iterable,
String... names) |
Modifier and Type | Method and Description |
---|---|
int |
getRowCount() |
Object |
getValueAt(int y,
int x) |
protected abstract Object |
getValueAt(R row,
int x)
Implementation method to retrieve a column value from a row object.
|
ArrayList<R> |
list()
Method to access the underlying row
List . |
column, getColumnClass, getColumnCount, getColumnName, header, isCellEditable, row, setColumnClass, setColumnName, setValueAt, tableChanged
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
protected ArrayListTableModel(Iterable<? extends R> iterable, String... names)
iterable
- The Iterable
of row values.names
- The column names.AbstractTableModelImpl.AbstractTableModelImpl(String...)
protected ArrayListTableModel(Iterable<? extends R> iterable, int columns)
iterable
- The Iterable
of row values.columns
- The number of columns.AbstractTableModelImpl.AbstractTableModelImpl(int)
public ArrayList<R> list()
List
.List
.public int getRowCount()
getRowCount
in interface TableModel
getRowCount
in class AbstractTableModelImpl
protected abstract Object getValueAt(R row, int x)
row
- The Object
representing the row.x
- The column index.public Object getValueAt(int y, int x)
getValueAt
in interface TableModel
getValueAt
in class AbstractTableModelImpl
Copyright © 2015–2020 Allen D. Ball. All rights reserved.