Package org.jdesktop.swingx.decorator
Class FilterPipeline.SorterBasedSortController
- java.lang.Object
-
- org.jdesktop.swingx.decorator.FilterPipeline.SorterBasedSortController
-
- All Implemented Interfaces:
SortController
- Enclosing class:
- FilterPipeline
protected class FilterPipeline.SorterBasedSortController extends java.lang.Object implements SortController
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSorterBasedSortController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SortercreateDefaultSorter()protected SortercreateDefaultSorter(SortKey sortKey)creates a Sorter initialized with sortKeyjava.util.List<? extends SortKey>getSortKeys()List the sort order by column.SortOrdergetSortOrder(int column)Get the sort order of the specified column.voidsetSortKeys(java.util.List<? extends SortKey> keys)Set the sort order by column.voidtoggleSortOrder(int column)Reverses the sort order of the specified column.voidtoggleSortOrder(int column, java.util.Comparator comparator)Reverses the sort order of the specified column.
-
-
-
Method Detail
-
toggleSortOrder
public void toggleSortOrder(int column)
Description copied from interface:SortControllerReverses the sort order of the specified column. It is up to implementating classes to provide the exact behavior when invoked.- Specified by:
toggleSortOrderin interfaceSortController- Parameters:
column- the model index of the column to toggle
-
toggleSortOrder
public void toggleSortOrder(int column, java.util.Comparator comparator)Description copied from interface:SortControllerReverses the sort order of the specified column. It is up to implementating classes to provide the exact behavior when invoked.- Specified by:
toggleSortOrderin interfaceSortController- Parameters:
column- the model index of the column to togglecomparator- the comparator to use
-
setSortKeys
public void setSortKeys(java.util.List<? extends SortKey> keys)
Description copied from interface:SortControllerSet the sort order by column.- Specified by:
setSortKeysin interfaceSortController
-
createDefaultSorter
protected Sorter createDefaultSorter(SortKey sortKey)
creates a Sorter initialized with sortKey- Parameters:
sortKey- the properties to use- Returns:
Sorterinitialized with the specifiedsortKey
-
createDefaultSorter
protected Sorter createDefaultSorter()
-
getSortKeys
public java.util.List<? extends SortKey> getSortKeys()
Description copied from interface:SortControllerList the sort order by column.- Specified by:
getSortKeysin interfaceSortController
-
getSortOrder
public SortOrder getSortOrder(int column)
Description copied from interface:SortControllerGet the sort order of the specified column. PENDING (JW) - remove? Looks like an "intermediate" convenience method. Not used in SwingX, only in test methods.- Specified by:
getSortOrderin interfaceSortController- Returns:
- one of
SortOrder.ASCENDING,SortOrder.DESCENDINGorSortOrder.UNSORTED.
-
-