Package com.illumon.iris.gui.table
Interface SortableModel
- All Superinterfaces:
TableModel
- All Known Implementing Classes:
DBTableModel
,InputOverlayTableModel
,IrisTreeTableModel
,SortedTableModel
public interface SortableModel extends TableModel
This interface defines a
TableModel
that is sortable.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SortableModel.SortingDirective
Object representing sort attributes on a column. -
Method Summary
Modifier and Type Method Description void
cancelSorting()
Clear sorting on all columns.Icon
getHeaderRendererIcon(int modelColumn, int size)
Get the sort icon for the specified column and size.Set<String>
getSortableColumns()
Get the set of sortable columns.SortableModel.SortingDirective
getSortingDirective(int column)
Get the sorting status of a single column.void
headerClicked(MouseEvent e)
Called when sorting should be changed based on a header click.boolean
isSorting()
determine whether there are any sorting directives - similar to empty()void
setSortingStatus(int column, int status, boolean isAbsolute, boolean clearSorting)
Set the sorting status of a single column.Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
-
Method Details
-
headerClicked
Called when sorting should be changed based on a header click.- Parameters:
e
- the drivingMouseEvent
-
getHeaderRendererIcon
Get the sort icon for the specified column and size. May return null, for no icon.- Parameters:
modelColumn
- the columnsize
- the icon size- Returns:
- an icon to render for sorting.
-
cancelSorting
void cancelSorting()Clear sorting on all columns. -
setSortingStatus
void setSortingStatus(int column, int status, boolean isAbsolute, boolean clearSorting)Set the sorting status of a single column. Adds to existing sort definition. -
getSortingDirective
Get the sorting status of a single column. -
isSorting
boolean isSorting()determine whether there are any sorting directives - similar to empty() -
getSortableColumns
Get the set of sortable columns.- Returns:
- the set of sortable columns
-