|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.events.SelectionAdapter
org.mailster.gui.prefs.widgets.TableViewerSorterHandler
public class 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 org.eclipse.swt.widgets.Table |
table
The Table that the TableViewerSorter is
bound to |
| Constructor Summary | |
|---|---|
TableViewerSorterHandler(org.eclipse.swt.widgets.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(org.eclipse.swt.events.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 org.eclipse.swt.widgets.Table table
Table that the TableViewerSorter is
bound to
private TableViewerSorter sorter
TableViewerSorter to use for sorting
| Constructor Detail |
|---|
public TableViewerSorterHandler(org.eclipse.swt.widgets.Table table,
TableViewerSorter sorter)
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()
TableViewerSorterHandler.
public void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
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.
widgetSelected in interface org.eclipse.swt.events.SelectionListenerwidgetSelected in class org.eclipse.swt.events.SelectionAdapterevent - Event the SelectionEvent triggeredpublic void sort(int columnIndex)
columnIndex - int the index of the column to sort
public void sort(int columnIndex,
boolean ascending)
columnIndex.
columnIndex - int the index of the column to sortascending - true for ascending, false
for descending sort orderprivate void registerColumns()
TableColumns to sort on header single mouse
click. Each single mouse click on the same
TableColumns
reverses the sort order.
private void unregisterColumns()
TableColumns from this
TableViewerSorterHandler.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||