Class DelegateTableModel

  • All Implemented Interfaces:
    java.io.Serializable, java.util.EventListener, javax.swing.event.TableModelListener, javax.swing.table.TableModel
    Direct Known Subclasses:
    AbstractIndexTableModel

    public class DelegateTableModel
    extends javax.swing.table.AbstractTableModel
    implements javax.swing.event.TableModelListener
    DelegateTableModel implements TableModel by routing all requests to its delegate model, and TableModelListener by routing all events to its listeners. Inserting a DelegateTableModel which has not been subclassed into a chain of table filters should have no effect.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.swing.table.TableModel delegate  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      DelegateTableModel​(javax.swing.table.TableModel delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class getColumnClass​(int columnIndex)  
      int getColumnCount()  
      java.lang.String getColumnName​(int columnIndex)  
      javax.swing.table.TableModel getDelegate()  
      int getRowCount()  
      java.lang.Object getValueAt​(int rowIndex, int columnIndex)  
      boolean isCellEditable​(int rowIndex, int columnIndex)  
      void setValueAt​(java.lang.Object aValue, int rowIndex, int columnIndex)  
      void tableChanged​(javax.swing.event.TableModelEvent e)  
      • 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
    • Field Detail

      • delegate

        protected javax.swing.table.TableModel delegate
    • Constructor Detail

      • DelegateTableModel

        public DelegateTableModel​(javax.swing.table.TableModel delegate)
    • Method Detail

      • getDelegate

        public javax.swing.table.TableModel getDelegate()
      • getRowCount

        public int getRowCount()
        Specified by:
        getRowCount in interface javax.swing.table.TableModel
      • getColumnCount

        public int getColumnCount()
        Specified by:
        getColumnCount in interface javax.swing.table.TableModel
      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int columnIndex)
        Specified by:
        getValueAt in interface javax.swing.table.TableModel
      • setValueAt

        public void setValueAt​(java.lang.Object aValue,
                               int rowIndex,
                               int columnIndex)
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
      • getColumnName

        public java.lang.String getColumnName​(int columnIndex)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • getColumnClass

        public java.lang.Class getColumnClass​(int columnIndex)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • isCellEditable

        public boolean isCellEditable​(int rowIndex,
                                      int columnIndex)
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
      • tableChanged

        public void tableChanged​(javax.swing.event.TableModelEvent e)
        Specified by:
        tableChanged in interface javax.swing.event.TableModelListener