Interface AdvancedTableModel<E>

  • All Superinterfaces:
    javax.swing.table.TableModel
    All Known Implementing Classes:
    DefaultEventTableModel, EventTableModel

    public interface AdvancedTableModel<E>
    extends javax.swing.table.TableModel
    AdvancedTableModel is the extended interface intended to be implemented by Glazed Lists table models. It provides additional methods for managing the TableFormat and disposing, for example.
    Author:
    Holger Brands
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void dispose()
      Releases the resources consumed by this AdvancedTableModel so that it may eventually be garbage collected.
      E getElementAt​(int index)
      Retrieves the value at the specified location from the table.
      TableFormat<? super E> getTableFormat()
      Gets the TableFormat used by this table model.
      void setTableFormat​(TableFormat<? super E> tableFormat)
      Sets the TableFormat that will extract column data from each element.
      • Methods inherited from interface javax.swing.table.TableModel

        addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
    • Method Detail

      • setTableFormat

        void setTableFormat​(TableFormat<? super E> tableFormat)
        Sets the TableFormat that will extract column data from each element. This has some very important consequences. Any cell selections will be lost - this is due to the fact that the TableFormats may have different numbers of columns, and JTable has no event to specify columns changing without rows.
      • getElementAt

        E getElementAt​(int index)
        Retrieves the value at the specified location from the table.

        This may be used by renderers to paint the cells of a row differently based on the entire value for that row.

        See Also:
        TableModel.getValueAt(int,int)