|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel gui.DataTableModel
public class DataTableModel
The dataTable model class extends AbstractTableModel, and provides the ability to update the corresponding element when a cell value has been changed.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
DataTableModel()
|
Method Summary | |
---|---|
java.lang.Class |
getColumnClass(int colNumber)
Get the Class of the selected column |
int |
getColumnCount()
Gets the number of columns in the data model |
java.lang.String |
getColumnName(int col)
Gets the name of the column at position col |
int |
getRowCount()
Gets the number of rows of data in the data model |
java.lang.Object |
getValueAt(int row,
int col)
Gets the value of the cell at given table co-ordinates |
boolean |
isCellEditable(int row,
int col)
Sets whether the given cell position is editable |
void |
setValueAt(java.lang.Object data,
int row,
int col)
Sets the value of the object at the given table position |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataTableModel()
Method Detail |
---|
public int getColumnCount()
public int getRowCount()
public java.lang.Object getValueAt(int row, int col)
row
- col
-
public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
-
public boolean isCellEditable(int row, int col)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- col
-
public void setValueAt(java.lang.Object data, int row, int col)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
data
- row
- col
- public java.lang.Class getColumnClass(int colNumber)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
colNumber
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |