Package org.jitterbit.ui.util

Examples of org.jitterbit.ui.util.KeyBindingInstaller


        panel.removeUndoableEditListener(undoManager);
        bindings.remove();
    }
   
    private KeyBindingInstaller installKeyBindings(JComponent root) {
        KeyBindingInstaller bindings = new KeyBindingInstaller(root, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        bindings.addBinding(KeyUtils.UNDO, "undo", new UndoAction());
        bindings.addBinding(KeyUtils.REDO, "redo", new RedoAction());
        bindings.install();
        return bindings;
    }
View Full Code Here


            table.addPropertyChangeListener(KongaTable.EDITING, new KeyBindingsUpdater());
        }
    }

    private void installKeyBindings(KongaTable table) {
        KeyBindingInstaller keyBindings = new KeyBindingInstaller(table);
        keyBindings.addBinding(null, "undo", undoAction);
        keyBindings.addBinding(null, "redo", redoAction);
        keyBindings.install();
        keyBindingsMap.put(table, keyBindings);
    }
View Full Code Here

                installKeyBindings(table);
            }
        }

        private void removeKeyBindings(KongaTable table) {
            KeyBindingInstaller bindings = keyBindingsMap.remove(table);
            if (bindings != null) {
                bindings.remove();
            }
        }
View Full Code Here

        }, Icons.HELP_ICON, Strings.get("FunctionTree.Help.Tooltip"), false);
        return help;
    }

    private void installHelpActionShortCut() {
        KeyBindingInstaller keys = new KeyBindingInstaller(tree.getTree());
        keys.addBinding(KeyUtils.HELP, "help", helpAction);
        keys.install();
    }
View Full Code Here

            }
        }, icon, Strings.get("ProjectItemTree.Transfer.Tooltip"), true);
    }

    private void installHelpActionShortCut() {
        KeyBindingInstaller keys = new KeyBindingInstaller(tree.getTree());
        keys.addBinding(KeyUtils.HELP, "help", helpAction);
        keys.install();
    }
View Full Code Here

        return link;
    }


    private void installKeyBindings(final JComponent ui) {
        KeyBindingInstaller bindings = new KeyBindingInstaller(ui, JComponent.WHEN_IN_FOCUSED_WINDOW);
        bindings.addBinding(KeyStroke.getKeyStroke('a'), "author", new AbstractAction() {

            @Override
            public void actionPerformed(ActionEvent e) {
                MainAuthorDialog.display();
            }
        });
        if (versionBanner != null) {
            bindings.addBinding(KeyStroke.getKeyStroke('v'), "version", new AbstractAction() {

                @Override
                public void actionPerformed(ActionEvent e) {
                    showVersionBanner();
                }
            });
        }
        bindings.install();
    }
View Full Code Here

        layout.south(south);
        return layout;
    }

    private void registerKeyBindings(JComponent root) {
        KeyBindingInstaller installer = new KeyBindingInstaller(root, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
        registerRefreshActionKeyBinding(installer);
        installer.install();
    }
View Full Code Here

        }
        return guard;
    }
   
    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();
    }
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

    public final Action getAddNewAction() {
        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

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.