Class AbstractIndexTableModel

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

    public abstract class AbstractIndexTableModel
    extends DelegateTableModel
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.ArrayList indexList  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

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

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int getRowCount()
      Get the number of rows in the table.
      java.lang.Object getValueAt​(int rowIndex, int columnIndex)  
      int mapRow​(int rowIndex)  
      void setValueAt​(java.lang.Object aValue, int rowIndex, int columnIndex)  
      void tableChanged​(javax.swing.event.TableModelEvent evt)
      Signal that the table has changed in some way.
      abstract void tableRowsDeleted​(int column, int firstRow, int lastRow)  
      abstract void tableRowsInserted​(int column, int firstRow, int lastRow)
      Filter the model.
      abstract void tableRowsUpdated​(int column, int firstRow, int lastRow)  
      • 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

      • indexList

        protected java.util.ArrayList indexList
    • Constructor Detail

      • AbstractIndexTableModel

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

      • tableRowsInserted

        public abstract void tableRowsInserted​(int column,
                                               int firstRow,
                                               int lastRow)
        Filter the model. Subclasses should implement this methods to provide the filter logic.
      • tableRowsDeleted

        public abstract void tableRowsDeleted​(int column,
                                              int firstRow,
                                              int lastRow)
      • tableRowsUpdated

        public abstract void tableRowsUpdated​(int column,
                                              int firstRow,
                                              int lastRow)
      • getRowCount

        public int getRowCount()
        Get the number of rows in the table.
        Specified by:
        getRowCount in interface javax.swing.table.TableModel
        Overrides:
        getRowCount in class DelegateTableModel
        Returns:
        The row count
      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int columnIndex)
        Specified by:
        getValueAt in interface javax.swing.table.TableModel
        Overrides:
        getValueAt in class DelegateTableModel
      • 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 DelegateTableModel
      • tableChanged

        public void tableChanged​(javax.swing.event.TableModelEvent evt)
        Signal that the table has changed in some way.
        Specified by:
        tableChanged in interface javax.swing.event.TableModelListener
        Overrides:
        tableChanged in class DelegateTableModel
        Parameters:
        evt - The TableModelEvent
      • mapRow

        public int mapRow​(int rowIndex)