Package com.illumon.iris.gui.table
Class SortedTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.illumon.iris.gui.table.IrisTableModel
com.illumon.iris.gui.table.GuiTableMap
com.illumon.iris.gui.table.SortedTableModel
- All Implemented Interfaces:
ExtendableTableInterface,MultiModelTable,ReversibleModel,SortableModel,UpdateListener,Workspace,Serializable,EventListener,TableModelListener,TableModel
public class SortedTableModel
extends GuiTableMap
implements Workspace, TableModelListener, SortableModel, ReversibleModel
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.gui.table.ExtendableTableInterface
ExtendableTableInterface.Entry, ExtendableTableInterface.PartialResultNested classes/interfaces inherited from interface com.illumon.iris.gui.table.ReversibleModel
ReversibleModel.ReverseTypeNested classes/interfaces inherited from interface com.illumon.iris.gui.table.SortableModel
SortableModel.SortingDirective -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Comparator<Comparable<?>>static final intstatic final Comparator<Object>static final Comparator<Object>static final intprotected static final com.fishlib.io.logger.LoggerFields inherited from class com.illumon.iris.gui.table.GuiTableMap
model_, originalTableModel_Fields inherited from class com.illumon.iris.gui.table.IrisTableModel
columnSet_, nonViewColumnSet_Fields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionSortedTableModel(com.fishlib.io.logger.Logger log, IrisTableModel tableModel) SortedTableModel(IrisTableModel tableModel) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidClear sorting on all columns.voidfinishAddColumns(ExtendableTableInterface.PartialResult partialResult) Incorporate the new DBTable and columns into tables and models.protected Comparator<?>getComparator(int column) getHeaderRendererIcon(int column, int size) Get the sort icon for the specified column and size.intgetMappedRowIndex(int index) getSortingDirective(int column) Get the sorting status of a single column.intgetSortingStatus(int column) org.jdom2.ElementSerialize the class into an element to be stored in the workspacevoidCalled when sorting should be changed based on a header click.booleandetermine whether there are any sorting directives - similar to empty()voidSet the type of reversal operation to perform.voidsetClassComparator(Class<?> type, Comparator<?> comparator) voidsetHeaderInteractionDisabled(boolean headerInteractionDisabled) voidsetSortingStatus(int column, int status, boolean isAbsolute) old interface for backward compatibilityvoidsetSortingStatus(int column, int status, boolean isAbsolute, boolean clearSorting) Set the sorting status of a single column.voidsetWorkspaceInfo(org.jdom2.Element workspaceInfo) Restore the class to the state defined by the data persisted in workspaceInfovoidMethods inherited from class com.illumon.iris.gui.table.GuiTableMap
beginAddColumns, getColumnClass, getColumnCount, getColumnName, getExtendedColumns, getModel, getModel, getOriginalModel, getOriginalRowIndex, getOriginalRowIndices, getOriginalRowIndices, getRowCount, getSortableColumns, getValueAt, isCellEditable, isStale, popFinishedCallback, setColumnSet, setFinishedCallback, setValueAt, supportsColumnChangeMethods inherited from class com.illumon.iris.gui.table.IrisTableModel
dispose, getColumnIndex, getColumnSet, getNonViewColumnSet, getTableModelName, processUpdate, registerAsUpdateListenerMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.gui.table.SortableModel
getSortableColumnsMethods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAtMethods inherited from interface com.illumon.iris.gui.workspace.Workspace
isGlobalSetting
-
Field Details
-
staticLog_
protected static final com.fishlib.io.logger.Logger staticLog_ -
DESCENDING
public static final int DESCENDING- See Also:
-
NOT_SORTED
public static final int NOT_SORTED- See Also:
-
ASCENDING
public static final int ASCENDING- See Also:
-
COMPARABLE_COMPARATOR
-
LEXICAL_COMPARATOR
-
INSENSITIVE_LEXICAL_COMPARATOR
-
-
Constructor Details
-
SortedTableModel
Deprecated. -
SortedTableModel
-
-
Method Details
-
setHeaderInteractionDisabled
public void setHeaderInteractionDisabled(boolean headerInteractionDisabled) -
isSorting
public boolean isSorting()Description copied from interface:SortableModeldetermine whether there are any sorting directives - similar to empty()- Specified by:
isSortingin interfaceSortableModel
-
getSortingStatus
public int getSortingStatus(int column) -
setSortingStatus
public void setSortingStatus(int column, int status, boolean isAbsolute) old interface for backward compatibility -
setSortingStatus
public void setSortingStatus(int column, int status, boolean isAbsolute, boolean clearSorting) Description copied from interface:SortableModelSet the sorting status of a single column. Adds to existing sort definition.- Specified by:
setSortingStatusin interfaceSortableModel
-
getSortingDirective
Description copied from interface:SortableModelGet the sorting status of a single column.- Specified by:
getSortingDirectivein interfaceSortableModel
-
getHeaderRendererIcon
Description copied from interface:SortableModelGet the sort icon for the specified column and size. May return null, for no icon.- Specified by:
getHeaderRendererIconin interfaceSortableModel- Parameters:
column- the columnsize- the icon size- Returns:
- an icon to render for sorting.
-
cancelSorting
public void cancelSorting()Description copied from interface:SortableModelClear sorting on all columns.- Specified by:
cancelSortingin interfaceSortableModel
-
setClassComparator
-
getComparator
-
getMappedRowIndex
public int getMappedRowIndex(int index) - Specified by:
getMappedRowIndexin classGuiTableMap
-
headerClicked
Description copied from interface:SortableModelCalled when sorting should be changed based on a header click.- Specified by:
headerClickedin interfaceSortableModel- Parameters:
e- the drivingMouseEvent
-
finishAddColumns
Description copied from interface:ExtendableTableInterfaceIncorporate the new DBTable and columns into tables and models. This must not be called on the Swing event thread.- Specified by:
finishAddColumnsin interfaceExtendableTableInterface- Overrides:
finishAddColumnsin classGuiTableMap- Parameters:
partialResult- intermediate results from beginAddColumns
-
getWorkspaceInfo
public org.jdom2.Element getWorkspaceInfo()Description copied from interface:WorkspaceSerialize the class into an element to be stored in the workspace- Specified by:
getWorkspaceInfoin interfaceWorkspace- Overrides:
getWorkspaceInfoin classGuiTableMap- Returns:
- An
Elementcontaining the data to persist.
-
setWorkspaceInfo
public void setWorkspaceInfo(org.jdom2.Element workspaceInfo) Description copied from interface:WorkspaceRestore the class to the state defined by the data persisted in workspaceInfo- Specified by:
setWorkspaceInfoin interfaceWorkspace- Overrides:
setWorkspaceInfoin classGuiTableMap- Parameters:
workspaceInfo- AnElementcontaining the persisted state.
-
tableChanged
- Specified by:
tableChangedin interfaceTableModelListener
-
reverse
Description copied from interface:ReversibleModelSet the type of reversal operation to perform.
ReversibleModel.ReverseType.None- No reversal is performedReversibleModel.ReverseType.PreReverse- Reverse the table before performing sortsReversibleModel.ReverseType.PostReverse- Reverse the table after performing sorts
- Specified by:
reversein interfaceReversibleModel
-
getReverseType
- Specified by:
getReverseTypein interfaceReversibleModel- Returns:
- The current table reversal mode.
-