Search in sources :

Example 1 with ColumnHeaderClickEventMatcher

use of org.eclipse.nebula.widgets.nattable.sort.event.ColumnHeaderClickEventMatcher in project nebula.widgets.nattable by eclipse.

the class SingleClickSortConfiguration method configureUiBindings.

/**
 * Remove the original key bindings and implement new ones.
 */
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
    // Register new bindings
    uiBindingRegistry.registerFirstSingleClickBinding(new ColumnHeaderClickEventMatcher(SWT.NONE, 1), new SortColumnAction(false));
    uiBindingRegistry.registerSingleClickBinding(MouseEventMatcher.columnHeaderLeftClick(SWT.MOD3), new SortColumnAction(true));
}
Also used : SortColumnAction(org.eclipse.nebula.widgets.nattable.sort.action.SortColumnAction) ColumnHeaderClickEventMatcher(org.eclipse.nebula.widgets.nattable.sort.event.ColumnHeaderClickEventMatcher)

Example 2 with ColumnHeaderClickEventMatcher

use of org.eclipse.nebula.widgets.nattable.sort.event.ColumnHeaderClickEventMatcher in project nebula.widgets.nattable by eclipse.

the class SortConfiguration method configureUiBindings.

/**
 * Remove the original key bindings and implement new ones.
 */
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
    // Register single click bindings
    uiBindingRegistry.registerSingleClickBinding(new ColumnHeaderClickEventMatcher(SWT.NONE, 1), new SortColumnAction(false));
    uiBindingRegistry.registerSingleClickBinding(MouseEventMatcher.columnHeaderLeftClick(SWT.ALT), new SortColumnAction(true));
}
Also used : SortColumnAction(org.eclipse.nebula.widgets.nattable.sort.action.SortColumnAction) ColumnHeaderClickEventMatcher(org.eclipse.nebula.widgets.nattable.sort.event.ColumnHeaderClickEventMatcher)

Aggregations

SortColumnAction (org.eclipse.nebula.widgets.nattable.sort.action.SortColumnAction)2 ColumnHeaderClickEventMatcher (org.eclipse.nebula.widgets.nattable.sort.event.ColumnHeaderClickEventMatcher)2