|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.odell.glazedlists.gui.AbstractTableComparatorChooser
ca.odell.glazedlists.swt.TableComparatorChooser
public final class TableComparatorChooser
A TableComparatorChooser is a tool that allows the user to sort a ListTable by clicking on the table's headers. It requires that the ListTable has a SortedList as a source as the sorting on that list is used.
Warning: This class is a a developer preview and subject to many bugs and API changes.
| Field Summary |
|---|
| Fields inherited from class ca.odell.glazedlists.gui.AbstractTableComparatorChooser |
|---|
MULTIPLE_COLUMN_KEYBOARD, MULTIPLE_COLUMN_MOUSE, SINGLE_COLUMN, sortedList, sortedListComparator, sortingState |
| Constructor Summary | |
|---|---|
TableComparatorChooser(EventTableViewer eventTableViewer,
SortedList sortedList,
boolean multipleColumnSort)
Creates a new TableComparatorChooser that responds to clicks on the specified table and uses them to sort the specified list. |
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class ca.odell.glazedlists.gui.AbstractTableComparatorChooser |
|---|
appendComparator, clearComparator, createComparatorForElement, fromString, getColumnComparatorIndex, getComparatorsForColumn, getSortingColumns, getSortingStyle, isColumnReverse, redetectComparator, setTableFormat, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TableComparatorChooser(EventTableViewer eventTableViewer,
SortedList 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.| Method Detail |
|---|
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 rebuildComparator()
rebuildComparator in class AbstractTableComparatorChooserpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||