Package com.iizix.swt
Class TableSorter
java.lang.Object
com.iizix.swt.TableSorter
- All Implemented Interfaces:
- Listener
Helper class to handle SWT table sorting.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- static final Comparator<Object>A number comparator, comparing numbers or strings.
- Constructor SummaryConstructorsConstructorDescription- TableSorter- (Table table, String... dataKeys) Constructs the table sorter and specifies column comparators.
- Method SummaryModifier and TypeMethodDescription- void- handleEvent- (Event event) Sorts the list on the selected column.- void- setComparator- (int index, Comparator<Object> comparator) Sets the comparator for a column index.
- Field Details- NUMBER_COMPARATORA number comparator, comparing numbers or strings.
 
- Constructor Details- TableSorterConstructs the table sorter and specifies column comparators.- Parameters:
- table- The table.
 
 
- Method Details- setComparatorSets the comparator for a column index.- Parameters:
- index- The column index.
- comparator- The comparator.
 
- handleEventSorts the list on the selected column.- Specified by:
- handleEventin interface- Listener
- Parameters:
- event-