.setHandler(new KeyShortcutEventHandler() {
@Override
public void onKeyShortcut(KeyShortcutEvent event) {
targetContentsPresenter
.savePendingChangesIfApplicable();
eventBus.fireEvent(new NavTransUnitEvent(
NextState));
}
}).build();
keyShortcutPresenter.register(nextStateShortcut);
prevStateShortcut =
KeyShortcut.Builder.builder()
.addKey(new Keys(Keys.ALT_KEY, KeyCodes.KEY_PAGEUP))
.setContext(ShortcutContext.Edit)
.setDescription(messages.prevIncomplete())
.setPreventDefault(true).setStopPropagation(true)
.setHandler(new KeyShortcutEventHandler() {
@Override
public void onKeyShortcut(KeyShortcutEvent event) {
targetContentsPresenter
.savePendingChangesIfApplicable();
eventBus.fireEvent(new NavTransUnitEvent(
PrevState));
}
}).build();
keyShortcutPresenter.register(prevStateShortcut);
}