Package ghidra.app.tablechooser
Class TableChooserTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- docking.widgets.table.AbstractGTableModel<T>
-
- docking.widgets.table.AbstractSortedTableModel<ROW_TYPE>
-
- docking.widgets.table.GDynamicColumnTableModel<ROW_OBJECT,DATA_SOURCE>
-
- docking.widgets.table.threaded.ThreadedTableModel<ROW_TYPE,Program>
-
- ghidra.util.table.GhidraProgramTableModel<ROW_TYPE>
-
- ghidra.util.table.AddressBasedTableModel<AddressableRowObject>
-
- ghidra.app.tablechooser.TableChooserTableModel
-
- All Implemented Interfaces:
ConfigurableColumnTableModel
,DynamicColumnTableModel<AddressableRowObject>
,RowObjectFilterModel<AddressableRowObject>
,RowObjectTableModel<AddressableRowObject>
,SelectionStorage<AddressableRowObject>
,SortedTableModel
,VariableColumnTableModel
,ProgramTableModel
,java.io.Serializable
,java.util.EventListener
,javax.swing.event.ChangeListener
,javax.swing.table.TableModel
public class TableChooserTableModel extends AddressBasedTableModel<AddressableRowObject>
- 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
WIDTH_UNDEFINED
-
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 Constructor Description TableChooserTableModel(java.lang.String title, ServiceProvider serviceProvider, Program program, TaskMonitor monitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
addCustomColumn(ColumnDisplay<T> columnDisplay)
void
addObject(AddressableRowObject rowObject)
Adds the specified object to this model and schedules an update.boolean
containsObject(AddressableRowObject obj)
protected java.util.Comparator<AddressableRowObject>
createSortComparator(int columnIndex)
An extension point for subclasses to insert their own comparator objects for their data.protected TableColumnDescriptor<AddressableRowObject>
createTableColumnDescriptor()
protected void
doLoad(Accumulator<AddressableRowObject> accumulator, TaskMonitor monitor)
The basic method that all children must implement.Address
getAddress(int row)
void
removeObject(AddressableRowObject obj)
Removes the specified object from this model and schedules an update.-
Methods inherited from class ghidra.util.table.AddressBasedTableModel
getProgramLocation, getProgramSelection
-
Methods inherited from class ghidra.util.table.GhidraProgramTableModel
getDataSource, getProgram, getProgramForRow, setProgram
-
Methods inherited from class docking.widgets.table.threaded.ThreadedTableModel
addInitialLoadListener, addThreadedTableModelListener, cancelAllUpdates, clearData, createIncrementalLoadJob, dispose, doFilter, fireTableChanged, getAddRemoveStrategy, getAllData, getModelData, getModelIndex, getModelRow, getName, getRowCount, getRowObjects, getTableFilter, getUnfilteredData, getUnfilteredIndexForRowObject, getUnfilteredRowCount, getUnfilteredRowObjectForIndex, getValueAt, getViewIndex, getViewRow, hasFilter, initializeSorting, isBusy, isFiltered, isLoadIncrementally, reFilter, reload, removeThreadedTableModelListener, reSort, setIncrementalTaskMonitor, setModelState, setTableFilter, sort, updateNow, updateObject
-
Methods inherited from class docking.widgets.table.GDynamicColumnTableModel
addTableColumn, addTableColumn, addTableColumns, createSortComparatorForColumn, disposeDynamicColumnData, getColumn, getColumnClass, getColumnCount, getColumnDescription, getColumnDisplayName, getColumnIndex, getColumnIndex, getColumnName, getColumnSettings, getColumnSettingsDefinitions, getColumnValueForRow, getDefaultColumnCount, getMaxLines, getPreferredColumnWidth, getRenderer, 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, 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
-
-
-
-
Constructor Detail
-
TableChooserTableModel
public TableChooserTableModel(java.lang.String title, ServiceProvider serviceProvider, Program program, TaskMonitor monitor)
-
-
Method Detail
-
addObject
public void addObject(AddressableRowObject rowObject)
Description copied from class:ThreadedTableModel
Adds the specified object to this model and schedules an update.- Overrides:
addObject
in classThreadedTableModel<AddressableRowObject,Program>
- Parameters:
rowObject
- the object to add
-
removeObject
public void removeObject(AddressableRowObject obj)
Description copied from class:ThreadedTableModel
Removes the specified object from this model and schedules an update.Note: for this method to function correctly, the given object must compare as
Object.equals(Object)
and have the sameObject.hashCode()
as the object to be removed from the table data. This allows clients to create proxy objects to pass into this method, as long as they honor those requirements.If this model's data is sorted, then a binary search will be used to locate the item to be removed. However, for this to work, all field used to sort the data must still be available from the original object and must be the same values. If this is not true, then the binary search will not work and a brute force search will be used.
- Overrides:
removeObject
in classThreadedTableModel<AddressableRowObject,Program>
- Parameters:
obj
- the object to remove
-
containsObject
public boolean containsObject(AddressableRowObject obj)
-
getAddress
public Address getAddress(int row)
- Specified by:
getAddress
in classAddressBasedTableModel<AddressableRowObject>
-
doLoad
protected void doLoad(Accumulator<AddressableRowObject> accumulator, TaskMonitor monitor) throws CancelledException
Description copied from class:ThreadedTableModel
The basic method that all children must implement. This is where children load their data.- Specified by:
doLoad
in classThreadedTableModel<AddressableRowObject,Program>
- Parameters:
accumulator
- the datastructure into which you should incrementally place you table row datamonitor
- the task monitor to check for cancellations and to update progress- Throws:
CancelledException
- if the task monitor has been cancelled and a call is made tomonitor.checkCancelled();
.
-
addCustomColumn
public <T> void addCustomColumn(ColumnDisplay<T> columnDisplay)
-
createSortComparator
protected java.util.Comparator<AddressableRowObject> createSortComparator(int columnIndex)
Description copied from class:AbstractSortedTableModel
An extension point for subclasses to insert their own comparator objects for their data. Subclasses can create comparators for a single or multiple columns, as desired.- Overrides:
createSortComparator
in classThreadedTableModel<AddressableRowObject,Program>
- Parameters:
columnIndex
- the column index- Returns:
- the comparator
-
createTableColumnDescriptor
protected TableColumnDescriptor<AddressableRowObject> createTableColumnDescriptor()
- Overrides:
createTableColumnDescriptor
in classAddressBasedTableModel<AddressableRowObject>
-
-