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 protected
SorterBasedSortController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Sorter
createDefaultSorter()
protected Sorter
createDefaultSorter(SortKey sortKey)
creates a Sorter initialized with sortKeyjava.util.List<? extends SortKey>
getSortKeys()
List the sort order by column.SortOrder
getSortOrder(int column)
Get the sort order of the specified column.void
setSortKeys(java.util.List<? extends SortKey> keys)
Set the sort order by column.void
toggleSortOrder(int column)
Reverses the sort order of the specified column.void
toggleSortOrder(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:SortController
Reverses the sort order of the specified column. It is up to implementating classes to provide the exact behavior when invoked.- Specified by:
toggleSortOrder
in 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:SortController
Reverses the sort order of the specified column. It is up to implementating classes to provide the exact behavior when invoked.- Specified by:
toggleSortOrder
in 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:SortController
Set the sort order by column.- Specified by:
setSortKeys
in interfaceSortController
-
createDefaultSorter
protected Sorter createDefaultSorter(SortKey sortKey)
creates a Sorter initialized with sortKey- Parameters:
sortKey
- the properties to use- Returns:
Sorter
initialized with the specifiedsortKey
-
createDefaultSorter
protected Sorter createDefaultSorter()
-
getSortKeys
public java.util.List<? extends SortKey> getSortKeys()
Description copied from interface:SortController
List the sort order by column.- Specified by:
getSortKeys
in interfaceSortController
-
getSortOrder
public SortOrder getSortOrder(int column)
Description copied from interface:SortController
Get 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:
getSortOrder
in interfaceSortController
- Returns:
- one of
SortOrder.ASCENDING
,SortOrder.DESCENDING
orSortOrder.UNSORTED
.
-
-