Package org.jitterbit.ui.util

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


    }

    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


        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

            @Override
            public void actionPerformed(ActionEvent e) {
                completionContext.refresh();
            }
        });
        r.install();
        return r;
    }
   
    /**
     * Disposes this support instance.
View Full Code Here

    }

    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

    }

    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()) {
            CheckBoxEntityNode checkedChild = new CheckBoxEntityNode(parent, originalChild.getUserObject(),
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) {
        final Controller ctrl = new Controller();
        ComponentTraverser.traverse(ui, new Acceptor<Component>() {
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                listener.itemRenameCancelled();
                removeFocusListener(focusHandler);
            }
        });
        installer.install();
    }
 
  public ItemRenamer(Object item, ItemRenamedListener listener) {
    this(item, null, listener);
  }
View Full Code Here

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

    }

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

    /**
     * Disposes this bracket matcher.
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.