Interface RowObjectTableModel<T>

Type Parameters:
T - The type of the row object.
All Superinterfaces:
TableModel
All Known Subinterfaces:
DynamicColumnTableModel<ROW_TYPE>, RowObjectFilterModel<ROW_OBJECT>
All Known Implementing Classes:
AbstractGTableModel, AbstractSortedTableModel, AddressArrayTableModel, AddressBasedTableModel, AddressPreviewTableModel, AddressSetTableModel, AlignedObjectBasedPreviewTableModel, AnyObjectTableModel, CustomLoadingAddressTableModel, DbSmallTableModel, DynamicTableModel, EmptyThreadedTableModel, FunctionXrefsTableModel, GDynamicColumnTableModel, GhidraProgramTableModel, IncomingReferencesTableModel, LanguageSortedTableModel, ProgramLocationPreviewTableModel, ProjectDataTableModel, ReferencesFromTableModel, SetEquateTableModel, TableChooserTableModel, TableModelWrapper, ThemeColorTableModel, ThemeFontTableModel, ThemeIconTableModel, ThreadedTableModel, ThreadedTableModelStub

public interface RowObjectTableModel<T> extends TableModel
An interface to mark that the given model uses a single object to represent each row in the table.
  • Method Details

    • unwrap

      static TableModel unwrap(TableModel m)
    • getName

      String getName()
      Returns the name of this model
      Returns:
      the name of this model
    • getRowObject

      T getRowObject(int viewRow)
      Returns the row object for the given row. This is the row in the UI. For models that know how to filter, the model row value will not match the view row value. For non-filtering models the view and model rows will always be the same.
      Parameters:
      viewRow - the row for which to return a row object.
      Returns:
      the row object
    • getRowIndex

      int getRowIndex(T t)
      Returns the row number for the given object.

      Note: the index returned is always the 'view' index. For non-filtering table models, the 'view' and the 'model' index are the same. However, for filtering table models, the 'view' may be a subset of the 'model' index. Thus, it is possible, if this model is a filtering model, that the given t may not have a row value for the current state of the model (i.e., when the model is filtered in the view. If you really need to get the model index in such a situation, see RowObjectFilterModel.

      Parameters:
      t - the object
      Returns:
      the row number
    • getModelData

      List<T> getModelData()
      Implementors should return the current data of the model. For models that support filtering, this will be the filtered version of the data. Furthermore, the data should be the underlying data and not a copy, as this method will potentially sort the given data.

      For those subclasses using an array, you may use the Arrays class to create a list backed by the array (Arrays.asList(Object...)).

      Returns:
      the model data.
    • getColumnValueForRow

      Object getColumnValueForRow(T t, int columnIndex)
      Implementors are expected to return a value at the given column index for the specified row object. This is essentially a more specific version of the TableModel.getValueAt(int, int) that allows this class's comparator objects to work.
      Parameters:
      t - The object that represents a given row.
      columnIndex - The column index for which a value is requested.
      Returns:
      a value at the given column index for the specified row object.
    • fireTableDataChanged

      void fireTableDataChanged()
      Sends an event to all listeners that all the data inside of this model may have changed.