Package ghidra.util.table

# Class AddressPreviewTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
docking.widgets.table.AbstractGTableModel<Address>
docking.widgets.table.AbstractSortedTableModel<Address>
docking.widgets.table.GDynamicColumnTableModel<Address,Program>
docking.widgets.table.threaded.ThreadedTableModel<Address,Program>
ghidra.util.table.GhidraProgramTableModel<Address>
ghidra.util.table.AddressBasedTableModel<Address>
ghidra.util.table.AddressPreviewTableModel

All Implemented Interfaces:
  `ConfigurableColumnTableModel`, `DynamicColumnTableModel<Address>`, `RowObjectFilterModel<Address>`, `RowObjectTableModel<Address>`, `SelectionStorage<Address>`, `SortedTableModel`, `VariableColumnTableModel`, `ProgramTableModel`, `Serializable`, `EventListener`, `ChangeListener`, `TableModel`

Direct Known Subclasses:
  `AddressArrayTableModel`, `AddressSetTableModel`, `CustomLoadingAddressTableModel`

public abstract class AddressPreviewTableModel extends AddressBasedTableModel<Address>
Table model that shows a location, label, and a preview column to show a preview of the code unit. The location can be in a memory address, a stack address, or a register address. The label is the primary symbol at the address, if one exists. Use this model when you have a list of addresses to build up dynamically.

See Also:
  - Serialized Form

- ## Nested Class Summary

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

  `ThreadedTableModel.IncrementalLoadJobListener`

- ## Field Summary

  ### Fields inherited from class ghidra.util.table.GhidraProgramTableModel

  `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`
  `AddressPreviewTableModel(String modelName, ServiceProvider serviceProvider, Program program, TaskMonitor monitor)`
  Constructor.
  `protected`
  `AddressPreviewTableModel(String modelName, ServiceProvider serviceProvider, Program program, TaskMonitor monitor, boolean loadIncrementally)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Address`
  `getAddress(int row)`
  Returns the best Address for the given row.
  `ProgramSelection`
  `getProgramSelection(int[] rows)`
  Returns a program selection corresponding to the specified row index array.
  `void`
  `setSelectionSize(int size)`
  Sets the size of the selections generated by this model when asked to create program selections.

  ### Methods inherited from class ghidra.util.table.GhidraProgramTableModel

  `createTableColumnDescriptor, dispose, getAddress, getDataSource, getProgram, getProgramForRow, getProgramLocation, setProgram`

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

- ## Constructor Details

  - ### AddressPreviewTableModel

    protected AddressPreviewTableModel(String modelName, ServiceProvider serviceProvider, Program program, TaskMonitor monitor)
    Constructor.
    Parameters:
      `modelName` - the name of the model (used for the title)
      `serviceProvider` - from which to get services
      `program` - the program upon which this model is being used
      `monitor` - the monitor to use for tracking progress and cancelling; may be null

  - ### AddressPreviewTableModel

    protected AddressPreviewTableModel(String modelName, ServiceProvider serviceProvider, Program program, TaskMonitor monitor, boolean loadIncrementally)
    Constructor.
    Parameters:
      `modelName` - the name of the model (used for the title)
      `serviceProvider` - from which to get services
      `program` - the program upon which this model is being used
      `monitor` - the monitor to use for tracking progress and cancelling; may be null
      `loadIncrementally` - true signals to show table results as they come in

- ## Method Details

  - ### setSelectionSize

    public void setSelectionSize(int size)
    Sets the size of the selections generated by this model when asked to create program selections. For example, some clients know that each table row represents a contiguous range of 4 addresses. In this case, when the user makes a selection, that client wants the selection to be 4 addresses, starting at the address in the given table row.
    Parameters:
      `size` - the size of the selections generated by this model when asked to create program selections.

  - ### getAddress

    public Address getAddress(int row)
    Description copied from class: `GhidraProgramTableModel`
    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.

    Overrides:
      `getAddress` in class `GhidraProgramTableModel<Address>`
    Parameters:
      `row` - the row
    Returns:
      the Address or null

  - ### getProgramSelection

    public ProgramSelection getProgramSelection(int[] rows)
    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`
    Overrides:
      `getProgramSelection` in class `GhidraProgramTableModel<Address>`
    Parameters:
      `rows` - the currently selected rows.
    Returns:
      a program selection