Package org.jitterbit.ui.util

Examples of org.jitterbit.ui.util.KeyBindingInstaller


        undoAction.setEnabled(alwaysConsumeKeyboardTriggers || canUndo());
        redoAction.setEnabled(alwaysConsumeKeyboardTriggers || canRedo());
    }

    public void installKeyBindings(JComponent c, int inputMapCondition) {
        keyBindingInstaller = new KeyBindingInstaller(c, inputMapCondition);
        keyBindingInstaller.addBinding(KeyUtils.UNDO, UNDO_ACTION_KEY, undoAction);
        keyBindingInstaller.addBinding(KeyUtils.REDO, REDO_ACTION_KEY, redoAction);
        keyBindingInstaller.install();
    }
View Full Code Here


        });
    }

    private void installKeyBindings(JComponent ui) {
        Action action = new ClickAction();
        KeyBindingInstaller inst = new KeyBindingInstaller(ui, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        inst.addBinding(KeyUtils.SPACE, "space", action);
        inst.addBinding(KeyUtils.ENTER, "enter", action);
        inst.install();
    }
View Full Code Here

        installKeyBindings();
    addFocusListener(focusHandler);
  }
   
    private void installKeyBindings() {
        KeyBindingInstaller installer = new KeyBindingInstaller(this);
        installer.addBinding(KeyUtils.ENTER, "enter", new AbstractAction() { //$NON-NLS-1$
           
            @Override
            public void actionPerformed(ActionEvent e) {
                focusHandler.focusLost(null);
            }
        });
        installer.addBinding(KeyUtils.ESCAPE, "escape", new AbstractAction() { //$NON-NLS-1$

            @Override
            public void actionPerformed(ActionEvent e) {
                listener.itemRenameCancelled();
                removeFocusListener(focusHandler);
            }
        });
        installer.install();
    }
View Full Code Here

        return new DefaultTokenChooser();
    }

    private KeyBindingInstaller bindRefresher(JTextComponent tc) {
        assert (completionContext != null);
        KeyBindingInstaller r = new KeyBindingInstaller(tc);
        r.addBinding(KeyUtils.REFRESH, "refresh_tokens", new AbstractAction() {

            @Override
            public void actionPerformed(ActionEvent e) {
                refresh();
            }
        });
        r.install();
        return r;
    }
View Full Code Here

        installImpl(text);
    }

    private void installImpl(JTextComponent text) {
        assert (text != null);
        keyBindings = new KeyBindingInstaller(text);
        keyBindings.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_SPACE), "", getTriggerAction()); //$NON-NLS-1$
        keyBindings.install();
    }
View Full Code Here

        anchorHighlighter = new AnchorHighlighter(matching, unbalanced);
        textComponent.addCaretListener(anchorHighlighter);
    }

    private KeyBindingInstaller installKeyBinding(JTextComponent text) {
        KeyBindingInstaller inst = new KeyBindingInstaller(text);
        inst.addBinding(KeyUtils.getCtrlShiftDown(KeyEvent.VK_P), "characterMatching", new TriggerAction());
        inst.install();
        return inst;
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.ui.util.KeyBindingInstaller

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.