Class SortTableColumnSelectionListener
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.table.SortTableColumnSelectionListener
- All Implemented Interfaces:
java.util.EventListener
,org.eclipse.swt.events.SelectionListener
,org.eclipse.swt.internal.SWTEventListener
public class SortTableColumnSelectionListener extends AbstractSortColumnSelectionListener
SelectionListener
implementation to sort a table column by using the
attached pagination controller of the SWT Table
.-
Constructor Summary
Constructors Constructor Description SortTableColumnSelectionListener(java.lang.String propertyName)
Constructor with property name and default sort (SWT.NONE).SortTableColumnSelectionListener(java.lang.String propertyName, int sortDirection)
Constructor with property name and sort direction.SortTableColumnSelectionListener(java.lang.String propertyName, int sortDirection, PageableController controller)
Constructor with property name and sort direction.SortTableColumnSelectionListener(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.Table
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
-
SortTableColumnSelectionListener
public SortTableColumnSelectionListener(java.lang.String propertyName)Constructor with property name and default sort (SWT.NONE).- Parameters:
propertyName
- the sort property name.
-
SortTableColumnSelectionListener
public SortTableColumnSelectionListener(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.
-
SortTableColumnSelectionListener
public SortTableColumnSelectionListener(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
.
-
SortTableColumnSelectionListener
public SortTableColumnSelectionListener(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.Table 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
-