Examples of KongaPopupMenu


Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

            appWin.removeGlobalKeyDispatcher(keyStroke, this);
        }

        @Override
        public boolean dispatch(KeyEvent evt, ApplicationWindow window) {
            KongaPopupMenu contextMenu = new KongaPopupMenu();
            for (ConsoleLauncher cl : launchers) {
                cl.addToContextMenu(contextMenu);
            }
            contextMenu.showCentered(appWin.getFrame());
            return true;
        }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

    public void setCallback(Receiver<Pair<DataStructureType, DataStructureType>> callback) {
        this.callback = callback;
    }

    public void show(JComponent c, int x, int y) {
        KongaPopupMenu pm = createPopup();
        pm.show(c, x, y);
    }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

        KongaPopupMenu pm = createPopup();
        pm.show(c, x, y);
    }

    private KongaPopupMenu createPopup() {
        KongaPopupMenu pm = new KongaPopupMenu();
        int number = 0;
        for (DataStructureType i : inputTypes) {
            if (i == DataStructureType.EDI) {
                continue;
            }
            for (DataStructureType o : outputTypes) {
                if (o == DataStructureType.EDI) {
                    continue;
                }
                pm.add(new Combination(number, i, o));
                ++number;
            }
        }
        return pm;
    }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

                activeObjectHelper.notifyListeners(rootFolder);
                PopupMenuManager mgr = owner.view.getPopupMenuManager();
                return mgr.getPopupMenu(PopupMenuSites.TREE, Arrays.asList(rootFolder));
            }
        } else {
            KongaPopupMenu popup = new KongaPopupMenu();
            Action openConnect = Application.getBean(OpenJitterbitConnectConsoleAction.ID, Action.class);
            popup.add(openConnect);
            return popup;
        }
        return null;
    }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

        this.view = view;
        this.menuFactory = menuFactory;
    }

    public final JPopupMenu asPopupMenu() {
        KongaPopupMenu pm = new KongaPopupMenu();
        List<? extends JMenuItem> items = menuFactory.createMenuItems(view);
        for (JMenuItem item : items) {
            if (item == null) {
                pm.addSeparator();
            } else {
                pm.add(item);
            }
        }
        return pm;
    }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

    private class ContextMenuProvider implements Supplier<JPopupMenu> {

        @Override
        public JPopupMenu get() {
            KongaPopupMenu menu = null;
            OrderedSelection sel = (OrderedSelection) view.getUsersAndGroupsViewer().getSelection();
            for (Action a : actions.getActionsForSelection(sel)) {
                if (menu == null) {
                    menu = new KongaPopupMenu();
                }
                menu.add(a);
            }
            return menu;
        }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

        private void openContextMenu(MouseEvent e) {
            List<Action> menuActions = getActionsToIncludeInMenu();
            if (menuActions.isEmpty()) {
                return;
            }
            KongaPopupMenu pm = new KongaPopupMenu();
            pm.addActions(menuActions);
            pm.show(e.getComponent(), e.getX(), e.getY());
        }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

        }
        return false;
    }

    private void displayPopupMenu(JmsEngineConsolePage page, int x, int y) {
        KongaPopupMenu pm = new KongaPopupMenu();
        page.populatePopupMenu(pm);
        pm.show(page.getMainPanel(), x, y);
    }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

            });
            return true;
        }

        private void createAndShowPopupMenu(ProjectConsoleAction[] consoleActions, Component source, int x, int y) {
            KongaPopupMenu popup = null;
            // HACK: The current implementation of how we populate the context menu forces us
            // to this rather ugly workaround for placing the Delete Project action last in the
            // popup menu (see bug 3217674).
            Action deleteProject = null;
            for (ProjectConsoleAction consoleAction : consoleActions) {
                Action a = consoleAction.getAction();
                if (a.isEnabled()) {
                    if (popup == null) {
                        popup = new KongaPopupMenu();
                    }
                    if (isDeleteProjectAction(a)) {
                        deleteProject = a;
                    } else {
                        popup.add(a);
                    }
                }
            }
            if (popup != null) {
                addDeleteProject(popup, deleteProject);
                popup.show(source, x, y);
            }
        }
View Full Code Here

Examples of org.jitterbit.ui.widget.popup.KongaPopupMenu

        private KongaTabbedPaneCloseEvent getCloseEvent() {
            return new KongaTabbedPaneCloseEvent(this, getSelectedIndex());
        }

        private void showPopupMenu(MouseEvent e) {
            KongaPopupMenu popup = new KongaPopupMenu();
            popup.add(closeTabAction);
            if (canCloseOthers) {
                popup.addActions(closeOtherTabsAction, closeAllTabsAction);
            }
            if (additionalActions != null) {
                popup.addActions(additionalActions);
            }
            popup.show(e.getComponent(), e.getX(), e.getY());
        }
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.