use of org.eclipse.nebula.widgets.nattable.ui.action.IKeyAction in project nebula.widgets.nattable by eclipse.
the class DefaultDataChangeConfiguration method configureUiBindings.
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, 's'), new IKeyAction() {
@Override
public void run(NatTable natTable, KeyEvent event) {
natTable.doCommand(new SaveDataChangesCommand());
}
});
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, 'd'), new IKeyAction() {
@Override
public void run(NatTable natTable, KeyEvent event) {
natTable.doCommand(new DiscardDataChangesCommand());
}
});
}
use of org.eclipse.nebula.widgets.nattable.ui.action.IKeyAction in project nebula.widgets.nattable by eclipse.
the class ConfigurableModeEventHandler method keyPressed.
// Event handling /////////////////////////////////////////////////////////
@Override
public void keyPressed(KeyEvent event) {
IKeyAction keyAction = getUiBindingRegistry().getKeyEventAction(event);
if (keyAction != null) {
this.natTable.forceFocus();
keyAction.run(this.natTable, event);
}
}
Aggregations