All Packages Class Hierarchy This Package Previous Next Index
Interface com.sun.java.swing.table.TableDataModel
- public interface TableDataModel
The TableDataModel interface specifies the interface for objects
that provides data for cells in a JTable.
- See Also:
- JTable
-
addTableModelListener(TableModelListener)
- Add a listener to the list that's notified each time a change
to the data model occurs.
-
getRowCount()
- Returns the number of records managed by the data source object.
-
getValueAt(Object, int)
- Returns an attribute value for the record in the column with the
unique identifier columnIdentifier at rowIndex.
-
removeTableModelListener(TableModelListener)
- Remove a listener from the list that's notified each time a
change to the data model occurs.
-
setValueAt(Object, Object, int)
- Sets an attribute value for the record in the column with
the unique identifier ColumnIdentifier at rowIndex.
getRowCount
public abstract int getRowCount()
- Returns the number of records managed by the data source object. A
JTable uses this method to determine how many rows it
should create and display. This method should be quick, as it
is call by JTable quite frequently.
getValueAt
public abstract Object getValueAt(Object columnIdentifier,
int rowIndex)
- Returns an attribute value for the record in the column with the
unique identifier columnIdentifier at rowIndex.
- Parameters:
- columnIdentifier - the column whose value is to be looked up
- rowIndex - the row whose value is to be looked up
setValueAt
public abstract void setValueAt(Object aValue,
Object columnIdentifier,
int rowIndex)
- Sets an attribute value for the record in the column with
the unique identifier ColumnIdentifier at rowIndex.
aValue is the new value.
- Parameters:
- aValue - the new value
- columnIdentifier - the column whose value is to be changed
- rowIndex - the row whose value is to be changed
addTableModelListener
public abstract void addTableModelListener(TableModelListener l)
- Add a listener to the list that's notified each time a change
to the data model occurs.
- Parameters:
- l - the TableModelListener
removeTableModelListener
public abstract void removeTableModelListener(TableModelListener l)
- Remove a listener from the list that's notified each time a
change to the data model occurs.
- Parameters:
- l - the TableModelListener
All Packages Class Hierarchy This Package Previous Next Index