Interface ExtendableTableInterface

All Known Implementing Classes:
DBTableModel, FilteredTableModel, GuiTableMap, InputOverlayTableModel, SortedTableModel

public interface ExtendableTableInterface
Defines tables that support adding and changing columns
  • Method Details

    • supportsColumnChange

      boolean supportsColumnChange()
      Determine whether this instance supports column change. Some subclasses support this in all cases, others only sometimes.
      Returns:
      true if it is valid to call addColumns
    • beginAddColumns

      Begin the process of setting extended columns. This will create and return a new DBTable via updateView, with new columns. Implementations must not touch Swing components, and callers must not invoke this on the Swing event thread.
      Parameters:
      columns - list of column name/definition entries to add
      Returns:
      PartialResult containing intermediate results to be passed to finishAddColumns
      Throws:
      RuntimeException - for a variety of errors
    • setFinishedCallback

      void setFinishedCallback(Runnable r)
      set a callback to be called on the swing thread sometime after finishAddColumns
      Parameters:
      r - Runnable to be called after finishAddColumns
    • popFinishedCallback

      Runnable popFinishedCallback()
      get the current callback value. set the callback to null
      Returns:
      current callback, if any
    • finishAddColumns

      void finishAddColumns(ExtendableTableInterface.PartialResult partialResult)
      Incorporate the new DBTable and columns into tables and models. This must not be called on the Swing event thread.
      Parameters:
      partialResult - intermediate results from beginAddColumns
    • getExtendedColumns

      List<ExtendableTableInterface.Entry> getExtendedColumns()
      get all extended columns and definitions
      Returns:
      list of name/definition pairs.
    • makeParameterList

      static Collection<String> makeParameterList(List<ExtendableTableInterface.Entry> columnDefinitions)
      Convenience method: convert list of entries into collection of updateView parameters in name=definition format
    • asString

      static String asString(List<ExtendableTableInterface.Entry> columnDefinitions)
      Convenience method: convert list of entries to useful string