Package org.jitterbit.ui.util

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


   
    private void installKeyBindings() {
        KeyBindingInstaller keys = new KeyBindingInstaller(field);
        keys.addBinding(KeyUtils.UP, "up", new HistoryAction(-1));
        keys.addBinding(KeyUtils.DOWN, "down", new HistoryAction(1));
        keys.addBinding(KeyUtils.ESCAPE, "clear", new ClearTextAction());
        keys.addBinding(KeyUtils.TAB, "complete", new CompletionAction());
        keys.install();
    }
   
    public void setWidth(int cols) {
View Full Code Here


    private void installKeyBindings() {
        KeyBindingInstaller keys = new KeyBindingInstaller(field);
        keys.addBinding(KeyUtils.UP, "up", new HistoryAction(-1));
        keys.addBinding(KeyUtils.DOWN, "down", new HistoryAction(1));
        keys.addBinding(KeyUtils.ESCAPE, "clear", new ClearTextAction());
        keys.addBinding(KeyUtils.TAB, "complete", new CompletionAction());
        keys.install();
    }
   
    public void setWidth(int cols) {
        field.setColumns(cols);
View Full Code Here

    private void bindActionShortCuts(JComponent root, Action[] actions) {
        KeyBindingInstaller keys = new KeyBindingInstaller(root, JComponent.WHEN_IN_FOCUSED_WINDOW);
        for (Action a : actions) {
            if (a.getValue(Action.ACCELERATOR_KEY) != null) {
                keys.addBinding(null, a.getValue(Action.NAME), a);
            }
        }
        keys.install();
    }
View Full Code Here

        return addNewAction;
    }

    final void registerKeyBindings(DocDefTableUi table) {
        KeyBindingInstaller installer = new KeyBindingInstaller(table);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_N), "add", addNewAction);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_U), "up", moveUpAction);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_D), "down", moveDownAction);
        installer.install();
    }
View Full Code Here

    }

    final void registerKeyBindings(DocDefTableUi table) {
        KeyBindingInstaller installer = new KeyBindingInstaller(table);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_N), "add", addNewAction);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_U), "up", moveUpAction);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_D), "down", moveDownAction);
        installer.install();
    }

    final int getVisibleRows() {
View Full Code Here

    final void registerKeyBindings(DocDefTableUi table) {
        KeyBindingInstaller installer = new KeyBindingInstaller(table);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_N), "add", addNewAction);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_U), "up", moveUpAction);
        installer.addBinding(KeyUtils.getCtrlDown(KeyEvent.VK_D), "down", moveDownAction);
        installer.install();
    }

    final int getVisibleRows() {
        return visibleRowRount;
View Full Code Here

        }
    }

    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

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

        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();
    }
   
    public static void whenFocused(JComponent c, Action a) {
        bind(c, JComponent.WHEN_FOCUSED, a);
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.