Search in sources :

Example 1 with SortColumnAction

use of org.eclipse.nebula.widgets.nattable.sort.action.SortColumnAction in project nebula.widgets.nattable by eclipse.

the class DefaultSortConfiguration method configureUiBindings.

@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
    uiBindingRegistry.registerSingleClickBinding(new MouseEventMatcher(SWT.MOD3, GridRegion.COLUMN_HEADER.toString(), 1), new SortColumnAction(false));
    uiBindingRegistry.registerSingleClickBinding(new MouseEventMatcher(SWT.MOD3 | SWT.MOD2, GridRegion.COLUMN_HEADER.toString(), 1), new SortColumnAction(true));
}
Also used : MouseEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher) SortColumnAction(org.eclipse.nebula.widgets.nattable.sort.action.SortColumnAction)

Example 2 with SortColumnAction

use of org.eclipse.nebula.widgets.nattable.sort.action.SortColumnAction 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 3 with SortColumnAction

use of org.eclipse.nebula.widgets.nattable.sort.action.SortColumnAction 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)3 ColumnHeaderClickEventMatcher (org.eclipse.nebula.widgets.nattable.sort.event.ColumnHeaderClickEventMatcher)2 MouseEventMatcher (org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher)1