|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.swt.events.SelectionAdapter
net.sourceforge.java.util.gui.jface.viewers.TableViewerSorterHandler
Enables sorting facility for Table instances using an
arbitrary TableViewerSorter for sorting.
| Field Summary | |
private TableViewerSorter |
sorter
The TableViewerSorter to use for sorting
|
private Table |
table
The Table that the TableViewerSorter is
bound to
|
| Constructor Summary | |
TableViewerSorterHandler(Table table,
TableViewerSorter sorter)
Creates a new TableViewerSorterHandler instance and
binds it to the specified Table using the given
TableViewerSorter to sort the model elements.
|
|
| Method Summary | |
void |
dispose()
Disposes this TableViewerSorterHandler. |
private void |
registerColumns()
Registers all TableColumns to sort on header single mouse
click. |
void |
sort(int columnIndex)
Sorts the underlying model by the specified column. |
void |
sort(int columnIndex,
boolean ascending)
Sorts the underlying model by the specified columnIndex.
|
private void |
unregisterColumns()
Unregisters all TableColumns from this
TableViewerSorterHandler.
|
void |
widgetSelected(SelectionEvent event)
Handles the SelectionEvent being triggered when the
sorting column and/or order of the Table changes. |
| Methods inherited from class org.eclipse.swt.events.SelectionAdapter |
widgetDefaultSelected |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Table table
The Table that the TableViewerSorter is
bound to
private TableViewerSorter sorter
The TableViewerSorter to use for sorting
| Constructor Detail |
public TableViewerSorterHandler(Table table,
TableViewerSorter sorter)
Creates a new TableViewerSorterHandler instance and
binds it to the specified Table using the given
TableViewerSorter to sort the model elements.
table - the Table to bind this
TableViewerSorterHandler tosorter - the TableViewerSorter to use to
sort the model elements| Method Detail |
public void dispose()
Disposes this TableViewerSorterHandler.
public void widgetSelected(SelectionEvent event)
Handles the SelectionEvent being triggered when the
sorting column and/or order of the Table changes. The
sorting of the underlying model is done using the selected column to sort
by. The sort direction is reversed, i.e. from ascending to descending and
reverse.
event - Event the SelectionEvent triggeredpublic void sort(int columnIndex)
Sorts the underlying model by the specified column. The sort direction is reversed.
columnIndex - int the index of the column to sort
public void sort(int columnIndex,
boolean ascending)
Sorts the underlying model by the specified columnIndex.
columnIndex - int the index of the column to sortascending - true for ascending, false
for descending sort orderprivate void registerColumns()
Registers all TableColumns to sort on header single mouse
click. Each single mouse click on the same
TableColumns
reverses the sort order.
private void unregisterColumns()
Unregisters all TableColumns from this
TableViewerSorterHandler.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||