Package ghidra.util.table

# Class GhidraProgramTableModel<ROW_TYPE>

java.lang.Object
javax.swing.table.AbstractTableModel
docking.widgets.table.AbstractGTableModel<ROW_TYPE>
docking.widgets.table.AbstractSortedTableModel<ROW_TYPE>
docking.widgets.table.GDynamicColumnTableModel<ROW_TYPE,Program>
docking.widgets.table.threaded.ThreadedTableModel<ROW_TYPE,Program>
ghidra.util.table.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`, `BSimExecutablesSummaryModel`, `QuickFixTableModel`

public abstract class GhidraProgramTableModel<ROW_TYPE> extends ThreadedTableModel<ROW_TYPE,Program> implements ProgramTableModel

See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class docking.widgets.table.threaded.ThreadedTableModel

  `ThreadedTableModel.IncrementalLoadJobListener`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Program`
  `program`

  ### Fields inherited from class docking.widgets.table.threaded.ThreadedTableModel

  `allData, filteredData`

  ### Fields inherited from class docking.widgets.table.GDynamicColumnTableModel

  `columnSettings, serviceProvider, tableColumns`

  ### Fields inherited from class docking.widgets.table.AbstractSortedTableModel

  `hasEverSorted`

  ### Fields inherited from class docking.widgets.table.AbstractGTableModel

  `isDisposed, WIDTH_UNDEFINED`

  ### Fields inherited from class javax.swing.table.AbstractTableModel

  `listenerList`

  ### Fields inherited from interface docking.widgets.table.RowObjectFilterModel

  `SUB_FILTERING_DISABLED_PROPERTY`

  ### Fields inherited from interface docking.widgets.table.SortedTableModel

  `ASCENDING_ORDER, DESCENDING_ORDER`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `GhidraProgramTableModel(String modelName, ServiceProvider serviceProvider, Program program, TaskMonitor monitor)`
  `protected`
  `GhidraProgramTableModel(String modelName, ServiceProvider serviceProvider, Program program, TaskMonitor monitor, boolean loadIncrementally)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected TableColumnDescriptor<ROW_TYPE>`
  `createTableColumnDescriptor()`
  `void`
  `dispose()`
  Disposes this model.
  `Address`
  `getAddress(int modelRow)`
  Returns the best Address for the given row.
  `Address`
  `getAddress(int modelRow, int modelColumn)`
  Returns an address for the given row and column.
  `Program`
  `getDataSource()`
  Returns the table's context for the data.
  `Program`
  `getProgram()`
  Returns the program associated with this ProgramTableModel.
  `protected Program`
  `getProgramForRow(ROW_TYPE t)`
  Extension point for getting a row-specific program.
  `ProgramLocation`
  `getProgramLocation(int modelRow, int modelColumn)`
  Returns a program location corresponding the given row and column.
  `ProgramSelection`
  `getProgramSelection(int[] modelRows)`
  Returns a program selection corresponding to the specified row index array.
  `void`
  `setProgram(Program program)`

  ### Methods inherited from class docking.widgets.table.threaded.ThreadedTableModel

  `addInitialLoadListener, addInitialLoadListener, addObject, addThreadedTableModelListener, backgroundWorkCancelled, cancelAllUpdates, clearData, createAccumulator, createIncrementalLoadJob, createSortComparator, doFilter, doLoad, fireTableChanged, getAddRemoveStrategy, getAllData, getModelData, getModelIndex, getModelRow, getName, getRowCount, getRowObjects, getTableFilter, getUnfilteredData, getUnfilteredIndexForRowObject, getUnfilteredRowCount, getUnfilteredRowObjectForIndex, getValueAt, getViewIndex, getViewRow, hasFilter, initializeSorting, isBusy, isFiltered, isLoadIncrementally, reFilter, reload, removeObject, removeThreadedTableModelListener, reSort, setIncrementalTaskMonitor, setModelState, setTableFilter, sort, startInitialLoad, updateNow, updateObject`

  ### Methods inherited from class docking.widgets.table.GDynamicColumnTableModel

  `addTableColumn, addTableColumn, addTableColumns, addTableColumns, createSortComparatorForColumn, disposeDynamicColumnData, getColumn, getColumnClass, getColumnCount, getColumnDescription, getColumnDisplayName, getColumnIndex, getColumnIndex, getColumnName, getColumnSettings, getColumnSettingsDefinitions, getColumnValueForRow, getDefaultColumnCount, getHeaderRenderer, getMaxLines, getPreferredColumnWidth, getRenderer, getTableColumnDescriptor, getUniqueIdentifier, isDefaultColumn, isSortable, isVisibleByDefault, loadDiscoveredTableColumns, reloadColumns, removeTableColumn, removeTableColumns, setAllColumnSettings, stateChanged`

  ### Methods inherited from class docking.widgets.table.AbstractSortedTableModel

  `addSortListener, cleanupTableSortState, createSortingContext, getIndexForRowObject, getIndexForRowObject, getPendingSortState, getPrimarySortColumnIndex, getRowIndex, getRowObject, getTableSortState, isSorted, isSortPending, notifyModelSorted, setDefaultTableSortState, setTableSortState, sortCompleted`

  ### Methods inherited from class docking.widgets.table.AbstractGTableModel

  `getLastSelectedObjects, isDisposed, refresh, setLastSelectedObjects`

  ### Methods inherited from class javax.swing.table.AbstractTableModel

  `addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface docking.widgets.table.RowObjectTableModel

  `fireTableDataChanged, getColumnValueForRow, getRowIndex, getRowObject`

  ### Methods inherited from interface javax.swing.table.TableModel

  `addTableModelListener, getColumnClass, getColumnCount, getColumnName, isCellEditable, removeTableModelListener, setValueAt`

- ## Field Details

  - ### program

    protected Program program

- ## Constructor Details

  - ### GhidraProgramTableModel

    protected GhidraProgramTableModel(String modelName, ServiceProvider serviceProvider, Program program, TaskMonitor monitor)

  - ### GhidraProgramTableModel

    protected GhidraProgramTableModel(String modelName, ServiceProvider serviceProvider, Program program, TaskMonitor monitor, boolean loadIncrementally)

- ## 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