public final class TableComparatorChooser<E> extends AbstractTableComparatorChooser<E>
MULTIPLE_COLUMN_KEYBOARD, MULTIPLE_COLUMN_MOUSE, MULTIPLE_COLUMN_MOUSE_WITH_UNDO, SINGLE_COLUMN, sortedList, sortedListComparator, sortingState
Constructor and Description |
---|
TableComparatorChooser(DefaultEventTableViewer<E> eventTableViewer,
SortedList<E> sortedList,
boolean multipleColumnSort)
Deprecated.
replaced with
install(ca.odell.glazedlists.swt.DefaultEventTableViewer<E>, ca.odell.glazedlists.SortedList<E>, boolean) , which is functionally
identical but uses a more fitting name to convey the action that is
performed. |
Modifier and Type | Method and Description |
---|---|
void |
addSortListener(Listener sortListener)
Registers the specified
Listener to receive notification whenever
the Table is sorted by this TableComparatorChooser . |
void |
dispose()
Releases the resources consumed by this
TableComparatorChooser so that it
may eventually be garbage collected. |
static <E> TableComparatorChooser<E> |
install(DefaultEventTableViewer<E> eventTableViewer,
SortedList<E> sortedList,
boolean multipleColumnSort)
Installs a new TableComparatorChooser that responds to clicks
on the specified table and uses them to sort the specified list.
|
protected void |
rebuildComparator()
Updates the comparator in use and applies it to the table.
|
void |
removeSortActionListener(Listener sortListener)
Deregisters the specified
Listener to no longer receive events. |
protected void |
updateTableSortColumn()
Updates the SWT table to indicate sorting icon on the primary sort column.
|
appendComparator, clearComparator, createComparatorForElement, createSortingState, fromString, getColumnComparatorIndex, getComparatorsForColumn, getSortingColumns, getSortingStyle, isColumnReverse, redetectComparator, setTableFormat, toString
public TableComparatorChooser(DefaultEventTableViewer<E> eventTableViewer, SortedList<E> sortedList, boolean multipleColumnSort)
install(ca.odell.glazedlists.swt.DefaultEventTableViewer<E>, ca.odell.glazedlists.SortedList<E>, boolean)
, which is functionally
identical but uses a more fitting name to convey the action that is
performed.public static <E> TableComparatorChooser<E> install(DefaultEventTableViewer<E> eventTableViewer, SortedList<E> sortedList, boolean multipleColumnSort)
eventTableViewer
- the table viewer for the table to be sortedsortedList
- the sorted list to update.multipleColumnSort
- true
to sort by multiple columns
at a time, or false
to sort by a single column. Although
sorting by multiple columns is more powerful, the user interface is
not as simple and this strategy should only be used where necessary.public void addSortListener(Listener sortListener)
Listener
to receive notification whenever
the Table
is sorted by this TableComparatorChooser
.public void removeSortActionListener(Listener sortListener)
Listener
to no longer receive events.protected final void updateTableSortColumn()
protected final void rebuildComparator()
This method is called when the sorting state changed.
rebuildComparator
in class AbstractTableComparatorChooser<E>
public void dispose()
TableComparatorChooser
so that it
may eventually be garbage collected.
A TableComparatorChooser
will be garbage collected without a call to
dispose()
, but not before its source EventList
is garbage
collected. By calling dispose()
, you allow the TableComparatorChooser
to be garbage collected before its source EventList
. This is
necessary for situations where an TableComparatorChooser
is short-lived but
its source EventList
is long-lived.
Warning: It is an error
to call any method on a TableComparatorChooser
after it has been disposed.
dispose
in class AbstractTableComparatorChooser<E>
Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by mockbuild at 2019-07-25 6:37