|
|||||||||||
| 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.TableTreeViewerSorterHandler
Enables sorting facility for tabular Tree instances using an
arbitrary TableTreeViewerSorter for sorting.
| Field Summary | |
private TableTreeViewerSorter |
sorter
The TableTreeViewerSorter to use for sorting
|
private Tree |
tree
The Tree that the TableTreeViewerSorter is
bound to
|
| Constructor Summary | |
TableTreeViewerSorterHandler(Tree tree,
TableTreeViewerSorter sorter)
Creates a new TableTreeViewerSorterHandler instance and
binds it to the specified Tree using the given
TableTreeViewerSorter to sort the model elements.
|
|
| Method Summary | |
void |
dispose()
Disposes this TableTreeViewerSorterHandler. |
private void |
registerColumns()
Registers all TreeColumns 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 TreeColumns from this
TableTreeViewerSorterHandler.
|
void |
widgetSelected(SelectionEvent event)
Handles the SelectionEvent being triggered when the
sorting column and/or order of the Tree 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 Tree tree
The Tree that the TableTreeViewerSorter is
bound to
private TableTreeViewerSorter sorter
The TableTreeViewerSorter to use for sorting
| Constructor Detail |
public TableTreeViewerSorterHandler(Tree tree,
TableTreeViewerSorter sorter)
Creates a new TableTreeViewerSorterHandler instance and
binds it to the specified Tree using the given
TableTreeViewerSorter to sort the model elements.
tree - the Tree to bind this
TableTreeViewerSorterHandler tosorter - the TableTreeViewerSorter to use to
sort the model elements| Method Detail |
public void dispose()
Disposes this TableTreeViewerSorterHandler.
public void widgetSelected(SelectionEvent event)
Handles the SelectionEvent being triggered when the
sorting column and/or order of the Tree 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 TreeColumns to sort on header single mouse
click. Each single mouse click on the same
TreeColumns
reverses the sort order.
private void unregisterColumns()
Unregisters all TreeColumns from this
TableTreeViewerSorterHandler.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||