Search in sources :

Example 1 with MoveToFirstRowAction

use of org.eclipse.nebula.widgets.nattable.selection.action.MoveToFirstRowAction in project nebula.widgets.nattable by eclipse.

the class DefaultSelectionBindings method configureMoveUpBindings.

protected void configureMoveUpBindings(UiBindingRegistry uiBindingRegistry, IKeyAction action) {
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.ARROW_UP), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.ARROW_UP), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.ARROW_UP), new MoveToFirstRowAction());
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.ARROW_UP), new MoveToFirstRowAction());
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.CR), new MoveSelectionAction(MoveDirectionEnum.UP, false, false));
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.CR), action);
}
Also used : KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher) MoveToFirstRowAction(org.eclipse.nebula.widgets.nattable.selection.action.MoveToFirstRowAction) MoveSelectionAction(org.eclipse.nebula.widgets.nattable.selection.action.MoveSelectionAction)

Example 2 with MoveToFirstRowAction

use of org.eclipse.nebula.widgets.nattable.selection.action.MoveToFirstRowAction in project nebula.widgets.nattable by eclipse.

the class RowSelectionUIBindings method configureMoveUpBindings.

@Override
protected void configureMoveUpBindings(UiBindingRegistry uiBindingRegistry, IKeyAction action) {
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.ARROW_UP), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.SHIFT, SWT.ARROW_UP), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.ARROW_UP), new MoveToFirstRowAction());
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.SHIFT | SWT.MOD1, SWT.ARROW_UP), new MoveToFirstRowAction());
}
Also used : KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher) MoveToFirstRowAction(org.eclipse.nebula.widgets.nattable.selection.action.MoveToFirstRowAction)

Aggregations

MoveToFirstRowAction (org.eclipse.nebula.widgets.nattable.selection.action.MoveToFirstRowAction)2 KeyEventMatcher (org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher)2 MoveSelectionAction (org.eclipse.nebula.widgets.nattable.selection.action.MoveSelectionAction)1