Package org.jitterbit.ui.util

Examples of org.jitterbit.ui.util.KeyBindingInstaller


    private final Map<KeyStroke, Action> originalActions;
   
    private WizardNavigationKeyBindings(Wizard wizard, JComponent c) {
        this.wizard = wizard;
        originalActions = Maps.newHashMap();
        KeyBindingInstaller kb = new KeyBindingInstaller(c);
        installMoveNext(kb, c);
        installMovePrevious(kb, c);
        kb.install();
    }
View Full Code Here


        ui.add(label);
    }

    public void activate(JComponent detector) {
        this.detector = detector;
        keyBindings = new KeyBindingInstaller(detector, JComponent.WHEN_IN_FOCUSED_WINDOW);
        keyBindings.addBinding(KeyStroke.getKeyStroke(KeyEvent.VK_CAPS_LOCK, 0), "caps_lock", new CapsLockAction()); //$NON-NLS-1$
        keyBindings.install();
    }
View Full Code Here

            showFormulaBuilder(node, result);
        }
    }

    private void installFocusKeyBindings() {
        KeyBindingInstaller bindings = new KeyBindingInstaller(this, WHEN_IN_FOCUSED_WINDOW);
        bindings.addBinding(KeyUtils.getAltDown(KeyEvent.VK_S), "focus-source", new FocusTreeComponentAction(m_sourceTreeComponent));
        bindings.install();
        // We do not install ALT-T for the target tree, since that conflicts with the
        // mnemonic for the top-level Transformation menu. To quickly go to the target
        // tree: ALT-S to focus the source tree, then TAB to move to the target tree.
    }
View Full Code Here

   
    private void installOpenFolderAction() {
        if (DebugMode.IS_ENABLED && SystemUtils.IS_OS_WINDOWS) {
            KongaTextField field = (KongaTextField) getInputComponent();
            GoToLocationAction action = new GoToLocationAction(field);
            KeyBindingInstaller inst = new KeyBindingInstaller(getInputComponent());
            inst.addBinding(null, "open", action);
            inst.install();
            field.addActionToContextMenu(action);
            field.addActionToContextMenu(null);
        }
    }
View Full Code Here

        return ac;
    }
   
    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) {
                completionContext.refresh();
            }
        });
        r.install();
        return r;
    }
View Full Code Here

        stringSearchDefiner.requestFocus();
    }

    public void installKeyBindings(JComponent c) {
        resultList.installKeyTraversal(c);
        keyBindings = new KeyBindingInstaller(displayer, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        keyBindings.addBinding(KeyUtils.ENTER, "enter", new AbstractAction() {

            @Override
            public void actionPerformed(ActionEvent e) {
                highlightSearchResult();
View Full Code Here

    public static void bind(JComponent c, Action a) {
        bind(c, JComponent.WHEN_FOCUSED, a);
    }

    public static void bind(JComponent c, int when, Action a) {
        KeyBindingInstaller installer = new KeyBindingInstaller(c, when);
        installer.addBinding(KeyUtils.ENTER, "default-action", a);
        installer.install();
    }
View Full Code Here

        CheckBoxTreeEvent evt = new CheckBoxTreeEvent(this, node);
        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();
    }
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

            lst.done(object);
        }
    }
   
    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

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.