Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## interfacing
Class NonEditableTableModel

    java.lang.Object
      javax.swing.table.AbstractTableModel
          javax.swing.table.DefaultTableModel
              interfacing.NonEditableTableModel

All Implemented Interfaces:
  java.io.Serializable, javax.swing.table.TableModel

    public class NonEditableTableModel

extends javax.swing.table.DefaultTableModel

It is a DefaultTableModel class that is modified to prevent editing.

Author:
  Majd Kokaly
See Also:
  Serialized Form

Constructor Summary
`NonEditableTableModel(int rows, int cols)`
`NonEditableTableModel(java.lang.String[] cols, int rows)`

Method Summary
`boolean` | `isCellEditable(int row, int column)` To prevent editing the id column.

Methods inherited from class javax.swing.table.DefaultTableModel
`addColumn, addColumn, addColumn, addRow, addRow, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt`

Methods inherited from class javax.swing.table.AbstractTableModel
`addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NonEditableTableModel

    public NonEditableTableModel(int rows,
                                 int cols)

### NonEditableTableModel

    public NonEditableTableModel(java.lang.String[] cols,
                                 int rows)

Method Detail

### isCellEditable

    public boolean isCellEditable(int row,
                                  int column)

  To prevent editing the id column.

  Specified by:
    `isCellEditable` in interface `javax.swing.table.TableModel`
  Overrides:
    `isCellEditable` in class `javax.swing.table.DefaultTableModel`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD