Class AbstractSortColumnSelectionListener

java.lang.Object
org.eclipse.swt.events.SelectionAdapter
org.eclipse.nebula.widgets.pagination.AbstractPageControllerSelectionListener<PageableController>
org.eclipse.nebula.widgets.pagination.AbstractSortColumnSelectionListener
All Implemented Interfaces:
java.util.EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
SortTableColumnSelectionListener, SortTreeColumnSelectionListener

public abstract class AbstractSortColumnSelectionListener
extends AbstractPageControllerSelectionListener<PageableController>
Abstract class to sort a widget (table tree etc...) column by using the attached pagination controller of the SWT parent (table tree...).
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractSortColumnSelectionListener​(java.lang.String propertyName)
    Constructor with property name and default sort (SWT.NONE).
    AbstractSortColumnSelectionListener​(java.lang.String propertyName, int sortDirection)
    Constructor with property name and sort direction.
    AbstractSortColumnSelectionListener​(java.lang.String propertyName, int sortDirection, PageableController controller)
    Constructor with property name and sort direction.
    AbstractSortColumnSelectionListener​(java.lang.String propertyName, PageableController controller)
    Constructor with property name and default sort (SWT.NONE).
  • Method Summary

    Modifier and Type Method Description
    protected abstract org.eclipse.swt.widgets.Widget getParent​(org.eclipse.swt.events.SelectionEvent e)
    Returns the parent of the sorted column (ex Table for TableColumn, Tree for TreeColumn).
    int getSortDirection()
    Returns the sort direction SWT.UP, SWT.DOWN.
    java.lang.String getSortPropertyName()
    Returns the property name used to sort.
    protected abstract 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).
    void widgetSelected​(org.eclipse.swt.events.SelectionEvent e)  

    Methods inherited from class org.eclipse.nebula.widgets.pagination.AbstractPageControllerSelectionListener

    getController

    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
  • Constructor Details

    • AbstractSortColumnSelectionListener

      public AbstractSortColumnSelectionListener​(java.lang.String propertyName)
      Constructor with property name and default sort (SWT.NONE).
      Parameters:
      propertyName - the sort property name.
    • AbstractSortColumnSelectionListener

      public AbstractSortColumnSelectionListener​(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.
    • AbstractSortColumnSelectionListener

      public AbstractSortColumnSelectionListener​(java.lang.String propertyName, int sortDirection)
      Constructor with property name and sort direction.
      Parameters:
      propertyName - the sort property name.
      sortDirection - the sort direction SWT.UP, SWT.DOWN.
    • AbstractSortColumnSelectionListener

      public AbstractSortColumnSelectionListener​(java.lang.String propertyName, int sortDirection, PageableController controller)
      Constructor with property name and sort direction.
      Parameters:
      propertyName - the sort property name.
      sortDirection - the sort direction SWT.UP, SWT.DOWN.
      controller - the controller to update when sort is applied.
  • Method Details

    • widgetSelected

      public void widgetSelected​(org.eclipse.swt.events.SelectionEvent e)
      Specified by:
      widgetSelected in interface org.eclipse.swt.events.SelectionListener
      Overrides:
      widgetSelected in class org.eclipse.swt.events.SelectionAdapter
    • getSortPropertyName

      public java.lang.String getSortPropertyName()
      Returns the property name used to sort.
      Returns:
      the sort property name.
    • getSortDirection

      public int getSortDirection()
      Returns the sort direction SWT.UP, SWT.DOWN.
      Returns:
    • getParent

      protected abstract org.eclipse.swt.widgets.Widget getParent​(org.eclipse.swt.events.SelectionEvent e)
      Returns the parent of the sorted column (ex Table for TableColumn, Tree for TreeColumn).
      Parameters:
      e -
      Returns:
    • sort

      protected abstract 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).
      Parameters:
      e -