Package docking.widgets.table
Interface SortedTableModel
-
- All Superinterfaces:
javax.swing.table.TableModel
- All Known Implementing Classes:
AbstractSortedTableModel,AddressArrayTableModel,AddressBasedTableModel,AddressPreviewTableModel,AddressSetTableModel,AlignedObjectBasedPreviewTableModel,AnyObjectTableModel,CustomLoadingAddressTableModel,DefaultSortedTableModel,DynamicTableModel,EmptyThreadedTableModel,GDynamicColumnTableModel,GhidraProgramTableModel,IncomingReferencesTableModel,LanguageSortedTableModel,ProgramLocationPreviewTableModel,ProjectDataTableModel,ReferencesFromTableModel,SetEquateTableModel,TableChooserTableModel,ThreadedTableModel,ThreadedTableModelStub
public interface SortedTableModel extends javax.swing.table.TableModelA table model that allows for setting the sorted column and direction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSortedTableModel.DefaultComparator
-
Field Summary
Fields Modifier and Type Field Description static booleanASCENDING_ORDERSort order in ascending order.static java.util.Comparator<java.lang.Object>DEFAULT_COMPARATORstatic booleanDESCENDING_ORDERSort order in descending order.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSortListener(SortListener l)Adds a listener to be notified when the sort state of this model changes.intgetPrimarySortColumnIndex()TableSortStategetTableSortState()booleanisSortable(int columnIndex)Returns true if the specified columnIndex is sortable.voidsetTableSortState(TableSortState tableSortState)
-
-
-
Field Detail
-
DEFAULT_COMPARATOR
static final java.util.Comparator<java.lang.Object> DEFAULT_COMPARATOR
-
ASCENDING_ORDER
static final boolean ASCENDING_ORDER
Sort order in ascending order.- See Also:
- Constant Field Values
-
DESCENDING_ORDER
static final boolean DESCENDING_ORDER
Sort order in descending order.- See Also:
- Constant Field Values
-
-
Method Detail
-
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()
-
setTableSortState
void setTableSortState(TableSortState tableSortState)
-
getTableSortState
TableSortState getTableSortState()
-
addSortListener
void addSortListener(SortListener l)
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
-
-