Class SortTreeColumnSelectionListener
java.lang.Object
org.eclipse.swt.events.SelectionAdapter
org.eclipse.nebula.widgets.pagination.AbstractPageControllerSelectionListener<PageableController>
org.eclipse.nebula.widgets.pagination.AbstractSortColumnSelectionListener
org.eclipse.nebula.widgets.pagination.tree.SortTreeColumnSelectionListener
- All Implemented Interfaces:
java.util.EventListener
,org.eclipse.swt.events.SelectionListener
,org.eclipse.swt.internal.SWTEventListener
public class SortTreeColumnSelectionListener extends AbstractSortColumnSelectionListener
SelectionListener
implementation to sort a tree column by using the
attached pagination controller of the SWT Tree
.-
Constructor Summary
Constructors Constructor 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). -
Method Summary
Modifier and Type Method 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).Methods inherited from class org.eclipse.nebula.widgets.pagination.AbstractSortColumnSelectionListener
getSortDirection, getSortPropertyName, widgetSelected
Methods inherited from class org.eclipse.nebula.widgets.pagination.AbstractPageControllerSelectionListener
getController
-
Constructor Details
-
SortTreeColumnSelectionListener
public SortTreeColumnSelectionListener(java.lang.String propertyName)Constructor with property name and default sort (SWT.NONE).- Parameters:
propertyName
- the sort property name.
-
SortTreeColumnSelectionListener
public SortTreeColumnSelectionListener(java.lang.String propertyName, PageableController controller)Constructor with property name and default sort (SWT.NONE).- Parameters:
propertyName
- the sort property name.controller
- the controller to update when sort is applied.
-
SortTreeColumnSelectionListener
public SortTreeColumnSelectionListener(java.lang.String propertyName, int sortDirection)Constructor with property name and sort direction.- Parameters:
propertyName
- the sort property name.sortDirection
- the sort directionSWT.UP
,SWT.DOWN
.
-
SortTreeColumnSelectionListener
public SortTreeColumnSelectionListener(java.lang.String propertyName, int sortDirection, PageableController controller)Constructor with property name and sort direction.- Parameters:
propertyName
- the sort property name.sortDirection
- the sort directionSWT.UP
,SWT.DOWN
.controller
- the controller to update when sort is applied.
-
-
Method Details
-
getParent
protected org.eclipse.swt.widgets.Tree getParent(org.eclipse.swt.events.SelectionEvent e)Description copied from class:AbstractSortColumnSelectionListener
Returns the parent of the sorted column (ex Table for TableColumn, Tree for TreeColumn).- Specified by:
getParent
in classAbstractSortColumnSelectionListener
- Returns:
-
sort
protected void sort(org.eclipse.swt.events.SelectionEvent e)Description copied from class:AbstractSortColumnSelectionListener
Sort the column od the parent of the sorted column (ex Table for TableColumn, Tree for TreeColumn).- Specified by:
sort
in classAbstractSortColumnSelectionListener
-