Class UneditableTableModel

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

    public class UneditableTableModel
    extends javax.swing.table.DefaultTableModel

    Title: UneditableTableModel

    Description: The purpose of this class is to override the DefaultTableModel so that the corresponding JTable's cells are not editable.

    Copyright: Copyright (c) 2005

    Company: NIH

    Version:
    1.0
    Author:
    Lee Orsino
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID
      Use serialVersionUID for interoperability.
      • Fields inherited from class javax.swing.table.DefaultTableModel

        columnIdentifiers, dataVector
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      UneditableTableModel()
      Creates a new UneditableTableModel object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isCellEditable​(int row, int column)
      Called by table renderer.
      • Methods inherited from class javax.swing.table.DefaultTableModel

        addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, 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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
    • Constructor Detail

      • UneditableTableModel

        public UneditableTableModel()
        Creates a new UneditableTableModel object.
    • Method Detail

      • isCellEditable

        public boolean isCellEditable​(int row,
                                      int column)
        Called by table renderer. Always returns false.
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.DefaultTableModel
        Parameters:
        row - int
        column - int
        Returns:
        boolean