Interface TableModel
- All Known Implementing Classes:
AbstractTableModel, DefaultTableModel, SortableTableModel, UiBinding.BoundTableModel
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener to the data changed eventintReturns the number of columns in the tablegetColumnName(int i) Returns the name of the column at the given offsetintReturns the number of rows in the tablegetValueAt(int row, int column) Returns the value of the cell at the given locationbooleanisCellEditable(int row, int column) Returns true if the cell at the given location is an editable cellvoidRemoves a listener to the data changed eventvoidsetValueAt(int row, int column, Object o) Sets the value of the cell at the given location
-
Method Details
-
getRowCount
int getRowCount()Returns the number of rows in the table
Returns
the number of rows in the table
-
getColumnCount
int getColumnCount()Returns the number of columns in the table
Returns
the number of columns in the table
-
getColumnName
Returns the name of the column at the given offset
Parameters
i: the offset for the column name
Returns
name to display at the top of the table
-
isCellEditable
boolean isCellEditable(int row, int column) Returns true if the cell at the given location is an editable cell
Parameters
-
row: the cell row -
column: the cell column
Returns
true if the cell at the given location is an editable cell
-
-
getValueAt
Returns the value of the cell at the given location
Parameters
-
row: the cell row -
column: the cell column
Returns
the value of the cell at the given location
-
-
setValueAt
Sets the value of the cell at the given location
Parameters
-
row: the cell row -
column: the cell column -
o: the value of the cell at the given location
-
-
addDataChangeListener
Adds a listener to the data changed event
Parameters
d: the new listener
-
removeDataChangeListener
Removes a listener to the data changed event
Parameters
d: the listener to remove
-