use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher in project nebula.widgets.nattable by eclipse.
the class DefaultSelectionBindings method configureMoveRightBindings.
// *** Arrow keys selection bindings ***
protected void configureMoveRightBindings(UiBindingRegistry uiBindingRegistry, IKeyAction action) {
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.ARROW_RIGHT), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.ARROW_RIGHT), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.ARROW_RIGHT), new MoveToLastColumnAction());
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.ARROW_RIGHT), new MoveToLastColumnAction());
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.TAB), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.TAB), action);
}
use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher in project nebula.widgets.nattable by eclipse.
the class DefaultSelectionBindings method configureEndButtonBindings.
// *** pg. up, pg. down, home, end keys selection bindings ***
protected void configureEndButtonBindings(UiBindingRegistry uiBindingRegistry, IKeyAction action) {
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.END), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.END), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.END), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.END), action);
}
use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher in project nebula.widgets.nattable by eclipse.
the class DefaultSelectionBindings method configureMoveDownBindings.
protected void configureMoveDownBindings(UiBindingRegistry uiBindingRegistry, IKeyAction action) {
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.ARROW_DOWN), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.ARROW_DOWN), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.ARROW_DOWN), new MoveToLastRowAction());
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.ARROW_DOWN), new MoveToLastRowAction());
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.CR), action);
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.CR), action);
}
use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher in project nebula.widgets.nattable by eclipse.
the class DefaultSelectionBindings method configureUiBindings.
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
// Move up
configureMoveUpBindings(uiBindingRegistry, new MoveSelectionAction(MoveDirectionEnum.UP));
// Move down
configureMoveDownBindings(uiBindingRegistry, new MoveSelectionAction(MoveDirectionEnum.DOWN));
// Move left
configureMoveLeftBindings(uiBindingRegistry, new MoveSelectionAction(MoveDirectionEnum.LEFT));
// Move right
configureMoveRightBindings(uiBindingRegistry, new MoveSelectionAction(MoveDirectionEnum.RIGHT));
// Page Up
configurePageUpButtonBindings(uiBindingRegistry, new PageUpAction());
// Page down
configurePageDownButtonBindings(uiBindingRegistry, new PageDownAction());
// Home
configureHomeButtonBindings(uiBindingRegistry, new MoveToHomeAction());
// End
configureEndButtonBindings(uiBindingRegistry, new MoveToEndAction());
// Select all
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, 'a'), new SelectAllAction());
// Copy
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, 'c'), new CopyDataAction());
// Mouse bindings - select Cell
configureBodyMouseClickBindings(uiBindingRegistry);
// Mouse bindings - select columns
configureColumnHeaderMouseClickBindings(uiBindingRegistry);
// Mouse bindings - select rows
configureRowHeaderMouseClickBindings(uiBindingRegistry);
// Mouse bindings - Drag
configureBodyMouseDragMode(uiBindingRegistry);
}
Aggregations