Package org.jitterbit.ui.util

Examples of org.jitterbit.ui.util.KeyBindingInstaller.addBinding()


        checkListeners.call().nodeToggled(evt);
    }

    private void registerActions() {
        KeyBindingInstaller installer = new KeyBindingInstaller(this);
        installer.addBinding(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), "space", new SpaceAction(this));
        installer.install();
    }

    private static void addChildren(KongaTreeNode node, CheckBoxEntityNode parent) {
        for (KongaTreeNode originalChild : node.children()) {
View Full Code Here


    private void addFocusKeyBindings() {
        KeyBindingInstaller focusBindings = new KeyBindingInstaller(JComponent.WHEN_FOCUSED);
        for (Pair<Action, String> b : focusActions) {
            KeyStroke ks = (KeyStroke) b.first.getValue(Action.ACCELERATOR_KEY);
            if (ks != null) {
                focusBindings.addBinding(ks, b.second, b.first);
            } else {
                System.err.println("No keystroke defined for the action " + b.first.getClass().getSimpleName());
            }
        }
        addKeyBindings(focusBindings);
View Full Code Here

        }
    }
   
    private void installKeyBindings(JComponent root) {
        KeyBindingInstaller bindings = new KeyBindingInstaller(root, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        bindings.addBinding(KeyUtils.ENTER, "enter", new FinalSelectionAction());
        bindings.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_ENTER), "ctrl-enter", new FinalSelectionAction());
        bindings.install();
    }
   
   
View Full Code Here

    }
   
    private void installKeyBindings(JComponent root) {
        KeyBindingInstaller bindings = new KeyBindingInstaller(root, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        bindings.addBinding(KeyUtils.ENTER, "enter", new FinalSelectionAction());
        bindings.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_ENTER), "ctrl-enter", new FinalSelectionAction());
        bindings.install();
    }
   
   
    private class FinalSelectionAction extends AbstractAction {
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();
    }

    private void installController(JComponent ui) {
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();
    }

    private void installController(JComponent ui) {
        final Controller ctrl = new Controller();
View Full Code Here

    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);
            }
View Full Code Here

            @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);
View Full Code Here

    }

    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();
            }
View Full Code Here

        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
Copyright © 2018 www.massapi.com. 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.