| Package | org.aswing.table |
| Interface | public interface TableModel |
| Implementors | AbstractTableModel |
TableModel interface specifies the methods the
JTable will use to interrogate a tabular data model.
| Method | Defined by | ||
|---|---|---|---|
|
Adds a listener to the list that is notified each time a change
to the data model occurs.
| TableModel | ||
|
getColumnClass(columnIndex:int):String
Returns the most specific superclass for all the cell values
in the column.
| TableModel | ||
|
getColumnCount():int
Returns the number of columns in the model.
| TableModel | ||
|
getColumnName(columnIndex:int):String
Returns the name of the column at
columnIndex. | TableModel | ||
|
getRowCount():int
Returns the number of rows in the model.
| TableModel | ||
|
getValueAt(rowIndex:int, columnIndex:int):*
Returns the value for the cell at
columnIndex and
rowIndex. | TableModel | ||
|
isCellEditable(rowIndex:int, columnIndex:int):Boolean
Returns true if the cell at
rowIndex and
columnIndex
is editable. | TableModel | ||
|
Removes a listener from the list that is notified each time a
change to the data model occurs.
| TableModel | ||
|
setValueAt(aValue:*, rowIndex:int, columnIndex:int):void
Sets the value in the cell at
columnIndex and
rowIndex to aValue. | TableModel | ||
| addTableModelListener | () | method |
public function addTableModelListener(l:TableModelListener):voidAdds a listener to the list that is notified each time a change to the data model occurs.
Parametersl:TableModelListener — the TableModelListener
|
| getColumnClass | () | method |
public function getColumnClass(columnIndex:int):String
Returns the most specific superclass for all the cell values
in the column. This is used by the JTable to set up a
default renderer and editor for the column.
columnIndex:int — the index of the column
|
String — the common ancestor class(name) of the object values in the model.
|
| getColumnCount | () | method |
public function getColumnCount():int
Returns the number of columns in the model. A
JTable uses this method to determine how many columns it
should create and display by default.
int — the number of columns in the model
|
See also
| getColumnName | () | method |
public function getColumnName(columnIndex:int):String
Returns the name of the column at columnIndex. This is used
to initialize the table's column header name. Note: this name does
not need to be unique; two columns in a table can have the same name.
columnIndex:int — the index of the column
|
String — the name of the column
|
| getRowCount | () | method |
public function getRowCount():int
Returns the number of rows in the model. A
JTable uses this method to determine how many rows it
should display. This method should be quick, as it
is called frequently during rendering.
int — the number of rows in the model
|
See also
| getValueAt | () | method |
public function getValueAt(rowIndex:int, columnIndex:int):*
Returns the value for the cell at columnIndex and
rowIndex.
rowIndex:int — the row whose value is to be queried
|
|
columnIndex:int — the column whose value is to be queried
|
* — the value Object at the specified cell
|
| isCellEditable | () | method |
public function isCellEditable(rowIndex:int, columnIndex:int):Boolean
Returns true if the cell at rowIndex and
columnIndex
is editable. Otherwise, setValueAt on the cell will not
change the value of that cell.
rowIndex:int — the row whose value to be queried
|
|
columnIndex:int — the column whose value to be queried
|
Boolean — true if the cell is editable
|
See also
| removeTableModelListener | () | method |
public function removeTableModelListener(l:TableModelListener):voidRemoves a listener from the list that is notified each time a change to the data model occurs.
Parametersl:TableModelListener — the TableModelListener
|
| setValueAt | () | method |
public function setValueAt(aValue:*, rowIndex:int, columnIndex:int):void
Sets the value in the cell at columnIndex and
rowIndex to aValue.
aValue:* — the new value
|
|
rowIndex:int — the row whose value is to be changed
|
|
columnIndex:int — the column whose value is to be changed
|
See also