public interface TableModel
A model for the content of a Table
.
Modifier and Type | Interface and Description |
---|---|
static class |
TableModel.TableModelEvent
An event fired by a table model when the model changes.
|
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.
|
String |
getColumnName(int column)
Get the name of the given column
|
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.
|
ContentType getCellContentType(int row, int column)
Get the content type of a cell.
row
- The row.column
- The columnint getColumnCount()
Get the number of columns in the model.
String getColumnName(int column)
Get the name of the given column
column
- The column numberint getRowCount()
Get the number of rows in the model.
Object getValueAt(int rowIndex, int columnIndex)
Get the value of a particular cell.
rowIndex
- The row of the cellcolumnIndex
- The column of the cellboolean isCellEditable(int rowIndex, int columnIndex)
Check if the cell is editable.
rowIndex
- The rowcolumnIndex
- The columnvoid setValueAt(Object value, int rowIndex, int columnIndex)
Set the value in a cell.
value
- The value to set.rowIndex
- The rowcolumnIndex
- The columnvoid addTableModelListener(ActionListener<TableModel.TableModelEvent> l)
Add a listener to be notified of changes to the model.
l
- void removeTableModelListener(ActionListener<TableModel.TableModelEvent> l)
Remove a listener.
l
- Copyright © 2022. All Rights Reserved.