Package ucar.ui.table
Class UndoableRowSorter<M extends TableModel>
- java.lang.Object
-
- javax.swing.RowSorter<M>
-
- javax.swing.DefaultRowSorter<M,Integer>
-
- javax.swing.table.TableRowSorter<M>
-
- ucar.ui.table.UndoableRowSorter<M>
-
public class UndoableRowSorter<M extends TableModel> extends TableRowSorter<M>
A row sorter whose ordering can be undone.- Since:
- 2014/12/10
- See Also:
- How to restore the original row order with JTable's row sorter?
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.DefaultRowSorter
DefaultRowSorter.ModelWrapper<M extends Object,I extends Object>
-
Nested classes/interfaces inherited from class javax.swing.RowSorter
RowSorter.SortKey
-
-
Constructor Summary
Constructors Constructor Description UndoableRowSorter()
Creates anUndoableRowSorter
with an empty model.UndoableRowSorter(M model)
Creates anUndoableRowSorter
usingmodel
as the underlyingTableModel
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
toggleSortOrder(int column)
-
Methods inherited from class javax.swing.table.TableRowSorter
getComparator, getStringConverter, setModel, setStringConverter, useToString
-
Methods inherited from class javax.swing.DefaultRowSorter
allRowsChanged, convertRowIndexToModel, convertRowIndexToView, getMaxSortKeys, getModel, getModelRowCount, getModelWrapper, getRowFilter, getSortKeys, getSortsOnUpdates, getViewRowCount, isSortable, modelStructureChanged, rowsDeleted, rowsInserted, rowsUpdated, rowsUpdated, setComparator, setMaxSortKeys, setModelWrapper, setRowFilter, setSortable, setSortKeys, setSortsOnUpdates, sort
-
Methods inherited from class javax.swing.RowSorter
addRowSorterListener, fireRowSorterChanged, fireSortOrderChanged, removeRowSorterListener
-
-
-
-
Constructor Detail
-
UndoableRowSorter
public UndoableRowSorter()
Creates anUndoableRowSorter
with an empty model.
-
UndoableRowSorter
public UndoableRowSorter(M model)
Creates anUndoableRowSorter
usingmodel
as the underlyingTableModel
.- Parameters:
model
- the underlyingTableModel
to use,null
is treated as an empty model
-
-
Method Detail
-
toggleSortOrder
public void toggleSortOrder(int column)
- Overrides:
toggleSortOrder
in classDefaultRowSorter<M extends TableModel,Integer>
-
-