Package docking.widgets.table
Interface SortedTableModel
- All Superinterfaces:
TableModel
- All Known Implementing Classes:
AbstractSortedTableModel
,AddressArrayTableModel
,AddressBasedTableModel
,AddressPreviewTableModel
,AddressSetTableModel
,AlignedObjectBasedPreviewTableModel
,AnyObjectTableModel
,CustomLoadingAddressTableModel
,DbSmallTableModel
,DynamicTableModel
,EmptyThreadedTableModel
,FunctionXrefsTableModel
,GDynamicColumnTableModel
,GhidraProgramTableModel
,IncomingReferencesTableModel
,LanguageSortedTableModel
,MemoryMatchTableModel
,ProgramLocationPreviewTableModel
,ProjectDataTableModel
,ReferencesFromTableModel
,SetEquateTableModel
,TableChooserTableModel
,ThemeColorTableModel
,ThemeFontTableModel
,ThemeIconTableModel
,ThreadedTableModel
,ThreadedTableModelStub
A table model that allows for setting the sorted column(s) and direction
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Sort order in ascending order.static final boolean
Sort order in descending order. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener to be notified when the sort state of this model changes.int
Returns the column index that is the primary sorted column; -1 if no column is sortedGets the sort state of this sorted modelboolean
isSortable
(int columnIndex) Returns true if the specified columnIndex is sortable.void
setTableSortState
(TableSortState state) Sets the sort state for this table modelMethods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
-
Field Details
-
ASCENDING_ORDER
static final boolean ASCENDING_ORDERSort order in ascending order.- See Also:
-
DESCENDING_ORDER
static final boolean DESCENDING_ORDERSort order in descending order.- See Also:
-
-
Method Details
-
isSortable
boolean isSortable(int columnIndex) Returns true if the specified columnIndex is sortable.- Parameters:
columnIndex
- the column index- Returns:
- true if the specified columnIndex is sortable
-
getPrimarySortColumnIndex
int getPrimarySortColumnIndex()Returns the column index that is the primary sorted column; -1 if no column is sorted- Returns:
- the index
-
setTableSortState
Sets the sort state for this table model- Parameters:
state
- the sort state
-
getTableSortState
TableSortState getTableSortState()Gets the sort state of this sorted model- Returns:
- the current sort state
-
addSortListener
Adds a listener to be notified when the sort state of this model changes.
Note: the listener may be stored in a weak collection, which means you have to maintain a handle to the listener so that it does not get garbage collected.- Parameters:
l
- the listener
-