public class SortTreeColumnSelectionListener extends AbstractSortColumnSelectionListener
SelectionListener
implementation to sort a tree column by using the
attached pagination controller of the SWT Tree
.Constructor and Description |
---|
SortTreeColumnSelectionListener(java.lang.String propertyName)
Constructor with property name and default sort (SWT.NONE).
|
SortTreeColumnSelectionListener(java.lang.String propertyName,
int sortDirection)
Constructor with property name and sort direction.
|
SortTreeColumnSelectionListener(java.lang.String propertyName,
int sortDirection,
PageableController controller)
Constructor with property name and sort direction.
|
SortTreeColumnSelectionListener(java.lang.String propertyName,
PageableController controller)
Constructor with property name and default sort (SWT.NONE).
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.widgets.Tree |
getParent(org.eclipse.swt.events.SelectionEvent e)
Returns the parent of the sorted column (ex Table for TableColumn, Tree
for TreeColumn).
|
protected void |
sort(org.eclipse.swt.events.SelectionEvent e)
Sort the column od the parent of the sorted column (ex Table for
TableColumn, Tree for TreeColumn).
|
getSortDirection, getSortPropertyName, widgetSelected
getController
public SortTreeColumnSelectionListener(java.lang.String propertyName)
propertyName
- the sort property name.public SortTreeColumnSelectionListener(java.lang.String propertyName, PageableController controller)
propertyName
- the sort property name.controller
- the controller to update when sort is applied.public SortTreeColumnSelectionListener(java.lang.String propertyName, int sortDirection)
propertyName
- the sort property name.sortDirection
- the sort direction SWT.UP
, SWT.DOWN
.public SortTreeColumnSelectionListener(java.lang.String propertyName, int sortDirection, PageableController controller)
propertyName
- the sort property name.sortDirection
- the sort direction SWT.UP
, SWT.DOWN
.controller
- the controller to update when sort is applied.protected org.eclipse.swt.widgets.Tree getParent(org.eclipse.swt.events.SelectionEvent e)
AbstractSortColumnSelectionListener
getParent
in class AbstractSortColumnSelectionListener
protected void sort(org.eclipse.swt.events.SelectionEvent e)
AbstractSortColumnSelectionListener
sort
in class AbstractSortColumnSelectionListener