org.jdesktop.swingx.decorator
Class FilterPipeline.SorterBasedSortController

java.lang.Object
  extended by org.jdesktop.swingx.decorator.FilterPipeline.SorterBasedSortController
All Implemented Interfaces:
SortController
Enclosing class:
FilterPipeline

protected class FilterPipeline.SorterBasedSortController
extends Object
implements SortController


Constructor Summary
protected FilterPipeline.SorterBasedSortController()
           
 
Method Summary
protected  Sorter createDefaultSorter()
           
protected  Sorter createDefaultSorter(SortKey sortKey)
          creates a Sorter initialized with sortKey
 List<? extends SortKey> getSortKeys()
          List the sort order by column.
 SortOrder getSortOrder(int column)
          Get the sort order of the specified column.
 void setSortKeys(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, Comparator comparator)
          Reverses the sort order of the specified column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterPipeline.SorterBasedSortController

protected FilterPipeline.SorterBasedSortController()
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 interface SortController
Parameters:
column - the model index of the column to toggle

toggleSortOrder

public void toggleSortOrder(int column,
                            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 interface SortController
Parameters:
column - the model index of the column to toggle
comparator - the comparator to use

setSortKeys

public void setSortKeys(List<? extends SortKey> keys)
Description copied from interface: SortController
Set the sort order by column.

Specified by:
setSortKeys in interface SortController

createDefaultSorter

protected Sorter createDefaultSorter(SortKey sortKey)
creates a Sorter initialized with sortKey

Parameters:
sortKey - the properties to use
Returns:
Sorter initialized with the specified sortKey

createDefaultSorter

protected Sorter createDefaultSorter()

getSortKeys

public List<? extends SortKey> getSortKeys()
Description copied from interface: SortController
List the sort order by column.

Specified by:
getSortKeys in interface SortController

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 interface SortController
Returns:
one of SortOrder.ASCENDING, SortOrder.DESCENDING or SortOrder.UNSORTED.