public class EntityListTableModel<T extends Entity> extends Object implements TableModel
A table model that allows using a Table to render and edit an EntityList.
TableModel.TableModelEvent| Constructor and Description |
|---|
EntityListTableModel(EntityType rowType,
EntityList<T> entities,
TableColumns columnsNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTableModelListener(ActionListener<TableModel.TableModelEvent> l)
Add a listener to be notified of changes to the model.
|
ContentType |
getCellContentType(int row,
int column)
Get the content type of a cell.
|
int |
getColumnCount()
Get the number of columns in the model.
|
FieldNode |
getColumnField(int column) |
String |
getColumnName(int column)
Get the name of the given column
|
Property |
getColumnProperty(int column) |
T |
getEntity(int row) |
EntityList<T> |
getEntityList() |
int |
getRowCount()
Get the number of rows in the model.
|
Object |
getValueAt(int rowIndex,
int columnIndex)
Get the value of a particular cell.
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Check if the cell is editable.
|
void |
removeTableModelListener(ActionListener<TableModel.TableModelEvent> l)
Remove a listener.
|
void |
setValueAt(Object value,
int rowIndex,
int columnIndex)
Set the value in a cell.
|
public EntityListTableModel(EntityType rowType, EntityList<T> entities, TableColumns columnsNode)
public ContentType getCellContentType(int row, int column)
TableModelGet the content type of a cell.
getCellContentType in interface TableModelrow - The row.column - The columnpublic int getColumnCount()
TableModelGet the number of columns in the model.
getColumnCount in interface TableModelpublic String getColumnName(int column)
TableModelGet the name of the given column
getColumnName in interface TableModelcolumn - The column numberpublic int getRowCount()
TableModelGet the number of rows in the model.
getRowCount in interface TableModelpublic Object getValueAt(int rowIndex, int columnIndex)
TableModelGet the value of a particular cell.
getValueAt in interface TableModelrowIndex - The row of the cellcolumnIndex - The column of the cellpublic boolean isCellEditable(int rowIndex,
int columnIndex)
TableModelCheck if the cell is editable.
isCellEditable in interface TableModelrowIndex - The rowcolumnIndex - The columnpublic void setValueAt(Object value, int rowIndex, int columnIndex)
TableModelSet the value in a cell.
setValueAt in interface TableModelvalue - The value to set.rowIndex - The rowcolumnIndex - The columnpublic void addTableModelListener(ActionListener<TableModel.TableModelEvent> l)
TableModelAdd a listener to be notified of changes to the model.
addTableModelListener in interface TableModelpublic void removeTableModelListener(ActionListener<TableModel.TableModelEvent> l)
TableModelRemove a listener.
removeTableModelListener in interface TableModelpublic Property getColumnProperty(int column)
public T getEntity(int row)
public FieldNode getColumnField(int column)
public EntityList<T> getEntityList()
Copyright © 2022. All Rights Reserved.