Class GhidraProgramTableModel<ROW_TYPE>

All Implemented Interfaces:
ConfigurableColumnTableModel, DynamicColumnTableModel<ROW_TYPE>, RowObjectFilterModel<ROW_TYPE>, RowObjectTableModel<ROW_TYPE>, SelectionStorage<ROW_TYPE>, SortedTableModel, VariableColumnTableModel, ProgramTableModel, Serializable, EventListener, ChangeListener, TableModel
Direct Known Subclasses:
AddressBasedTableModel

public abstract class GhidraProgramTableModel<ROW_TYPE> extends ThreadedTableModel<ROW_TYPE,Program> implements ProgramTableModel
See Also:
  • Field Details

    • program

      protected Program program
  • Constructor Details

  • Method Details

    • createTableColumnDescriptor

      protected TableColumnDescriptor<ROW_TYPE> createTableColumnDescriptor()
      Specified by:
      createTableColumnDescriptor in class GDynamicColumnTableModel<ROW_TYPE,Program>
    • setProgram

      public void setProgram(Program program)
    • getProgramForRow

      protected Program getProgramForRow(ROW_TYPE t)
      Extension point for getting a row-specific program. Most models don't need this capability.
      Parameters:
      t - The ROW_TYPE row object
      Returns:
      the program
    • getProgram

      public Program getProgram()
      Description copied from interface: ProgramTableModel
      Returns the program associated with this ProgramTableModel.
      Specified by:
      getProgram in interface ProgramTableModel
      Returns:
      the program associated with this ProgramTableModel.
    • getDataSource

      public Program getDataSource()
      Description copied from class: GDynamicColumnTableModel
      Returns the table's context for the data.
      Specified by:
      getDataSource in class GDynamicColumnTableModel<ROW_TYPE,Program>
      Returns:
      the table's context for the data.
    • dispose

      public void dispose()
      Description copied from class: ThreadedTableModel
      Disposes this model. Once a model has been disposed, it cannot be reused.
      Overrides:
      dispose in class ThreadedTableModel<ROW_TYPE,Program>
    • getAddress

      public Address getAddress(int modelRow, int modelColumn)
      Returns an address for the given row and column.
      Parameters:
      modelRow - the model row
      modelColumn - the column row
      Returns:
      the address
    • getAddress

      public Address getAddress(int modelRow)
      Returns the best Address for the given row.

      Implementation Note: this class will only return an Address if this model's row type is Address. Clients that know how to get an Address for a given row should override this method.

      Parameters:
      modelRow - the row
      Returns:
      the Address or null
    • getProgramLocation

      public ProgramLocation getProgramLocation(int modelRow, int modelColumn)
      Description copied from interface: ProgramTableModel
      Returns a program location corresponding the given row and column.

      Motivation: Given a table that has a column that contains addresses. If the user clicks on this column, then it would be nice to have the CodeBrowser navigate to this address.

      Specified by:
      getProgramLocation in interface ProgramTableModel
      Parameters:
      modelRow - the row
      modelColumn - the column in the model's index
      Returns:
      a program location corresponding the given row and column
    • getProgramSelection

      public ProgramSelection getProgramSelection(int[] modelRows)
      Description copied from interface: ProgramTableModel
      Returns a program selection corresponding to the specified row index array. This array will contain the currently selected rows.
      Specified by:
      getProgramSelection in interface ProgramTableModel
      Parameters:
      modelRows - the currently selected rows.
      Returns:
      a program selection