Package org.zanata.webtrans.client.events

Examples of org.zanata.webtrans.client.events.KeyShortcutEvent


    public void processKeyEvent(NativeEvent evt) {
        Keys pressedKeys = event.createKeys(evt);
        Set<KeyShortcut> similarShortcuts =
                ensureShortcutMap().get(pressedKeys);
        boolean firedEvent = false;
        KeyShortcutEvent shortcutEvent = new KeyShortcutEvent(pressedKeys);
        if (similarShortcuts != null && !similarShortcuts.isEmpty()) {
            for (KeyShortcut shortcut : similarShortcuts) {
                boolean matchingEventType =
                        shortcut.getKeyEvent().nativeEventType.equals(event
                                .getType(evt));
View Full Code Here


                Matchers.equalTo(ShortcutContext.Chat));

        // key handler
        when(identity.getPerson()).thenReturn(person);
        when(display.getChatInputText()).thenReturn("hello");
        keyShortcut.getHandler().onKeyShortcut(new KeyShortcutEvent(keys));
        verify(spyPresenter).dispatchChatAction(person.getId().toString(),
                "hello", HasWorkspaceChatData.MESSAGE_TYPE.USER_MSG);
    }
View Full Code Here

TOP

Related Classes of org.zanata.webtrans.client.events.KeyShortcutEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.