Package org.jitterbit.ui.util

Examples of org.jitterbit.ui.util.KeyBindingInstaller$Entry


   
    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

        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

TOP

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

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.