Search in sources :

Example 6 with KeyEventMatcher

use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher in project nebula.widgets.nattable by eclipse.

the class DefaultSelectionBindings method configurePageUpButtonBindings.

protected void configurePageUpButtonBindings(UiBindingRegistry uiBindingRegistry, PageUpAction action) {
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.PAGE_UP), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.PAGE_UP), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.PAGE_UP), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.PAGE_UP), action);
}
Also used : KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher)

Example 7 with KeyEventMatcher

use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher 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 8 with KeyEventMatcher

use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher in project nebula.widgets.nattable by eclipse.

the class DefaultSelectionBindings method configurePageDownButtonBindings.

protected void configurePageDownButtonBindings(UiBindingRegistry uiBindingRegistry, IKeyAction action) {
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.PAGE_DOWN), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.PAGE_DOWN), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.PAGE_DOWN), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.PAGE_DOWN), action);
}
Also used : KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher)

Example 9 with KeyEventMatcher

use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher in project nebula.widgets.nattable by eclipse.

the class DefaultSelectionBindings method configureHomeButtonBindings.

protected void configureHomeButtonBindings(UiBindingRegistry uiBindingRegistry, IKeyAction action) {
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.HOME), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.HOME), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.HOME), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.HOME), action);
}
Also used : KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher)

Example 10 with KeyEventMatcher

use of org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher in project nebula.widgets.nattable by eclipse.

the class DefaultSelectionBindings method configureMoveLeftBindings.

protected void configureMoveLeftBindings(UiBindingRegistry uiBindingRegistry, IKeyAction action) {
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.ARROW_LEFT), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.ARROW_LEFT), action);
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, SWT.ARROW_LEFT), new MoveToFirstColumnAction());
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.ARROW_LEFT), new MoveToFirstColumnAction());
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2, SWT.TAB), new MoveSelectionAction(MoveDirectionEnum.LEFT, false, false));
    uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD2 | SWT.MOD1, SWT.TAB), action);
}
Also used : MoveToFirstColumnAction(org.eclipse.nebula.widgets.nattable.selection.action.MoveToFirstColumnAction) KeyEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher) MoveSelectionAction(org.eclipse.nebula.widgets.nattable.selection.action.MoveSelectionAction)

Aggregations

KeyEventMatcher (org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher)24 MoveSelectionAction (org.eclipse.nebula.widgets.nattable.selection.action.MoveSelectionAction)3 IKeyEventMatcher (org.eclipse.nebula.widgets.nattable.ui.matcher.IKeyEventMatcher)3 Test (org.junit.Test)3 HashMap (java.util.HashMap)2 NatTable (org.eclipse.nebula.widgets.nattable.NatTable)2 MouseEditAction (org.eclipse.nebula.widgets.nattable.edit.action.MouseEditAction)2 ColumnGroupExpandCollapseAction (org.eclipse.nebula.widgets.nattable.group.action.ColumnGroupExpandCollapseAction)2 ColumnGroupHeaderReorderDragMode (org.eclipse.nebula.widgets.nattable.group.action.ColumnGroupHeaderReorderDragMode)2 ColumnHeaderReorderDragMode (org.eclipse.nebula.widgets.nattable.group.action.ColumnHeaderReorderDragMode)2 CreateColumnGroupAction (org.eclipse.nebula.widgets.nattable.group.action.CreateColumnGroupAction)2 UngroupColumnsAction (org.eclipse.nebula.widgets.nattable.group.action.UngroupColumnsAction)2 MoveToFirstRowAction (org.eclipse.nebula.widgets.nattable.selection.action.MoveToFirstRowAction)2 AggregateDragMode (org.eclipse.nebula.widgets.nattable.ui.action.AggregateDragMode)2 CellDragMode (org.eclipse.nebula.widgets.nattable.ui.action.CellDragMode)2 VisualRefreshCommand (org.eclipse.nebula.widgets.nattable.command.VisualRefreshCommand)1 AbstractRegistryConfiguration (org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration)1 ConfigRegistry (org.eclipse.nebula.widgets.nattable.config.ConfigRegistry)1 DefaultNatTableStyleConfiguration (org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration)1 IConfigRegistry (org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)1