Package org.jitterbit.application.ui.menu

Examples of org.jitterbit.application.ui.menu.Menu


      Action action = new AbstractAction() {

            @Override
            public void actionPerformed(ActionEvent e) {
                MenuManager mgr = m_TreeMapper.getView().getMenuManager();
                Menu menu = mgr.getMenu(InterchangeMenus.MAP_AREA_SETTINGS);
                JPopupMenu popup = new JPopupMenu();
                menu.populate(popup);
                m_TreeMapper.showPopupMenu(popup);
            }
      };
      if(m_TreeMapper!=null)m_TreeMapper.registerKeyboardShortCut(KeyUtils.getCtrlDown(KeyEvent.VK_M), "displaySettings", action);
  }
View Full Code Here


            }
        }
    }

    private void addShowDataNodes(KongaPopupMenu pm) {
        Menu menu = new TransformationShowDataMenu(page);
        pm.add(menu.createJMenu(InterchangeMenuDictionary.DICTIONARY));
    }
View Full Code Here

    @Override
    protected final PopupMenuItem createItem() {
        Editor page = editors.getActiveEditor();
        if (page instanceof TransformationPage) {
            TransformationPage txPage = (TransformationPage) page;
            Menu menu = createMenu(txPage);
            return new MenuBasedPagePopupMenuItem(menu);
        } else {
            return PopupMenuItem.NULL;
        }
    }
View Full Code Here

        TreeMapper treeMapper = page.getTreeMapper();
        treeMapper.showPopupMenu(popup);
    }

    private JPopupMenu createPopup() {
        Menu menu = new EditTransformationMenu(page);
        JPopupMenu pm = new JPopupMenu();
        menu.populate(pm);
        return pm;
    }
View Full Code Here

            addRecentProject(loc);
        }
    }
   
    private void removeAll() {
        Menu fileMenu = getFileMenu();
        fileMenu.removeExtension(FILE_MENU_EXTENSION_POINT, CONTRIBUTION_ID);
        contribution = new MenuContribution(CONTRIBUTION_ID);
    }
View Full Code Here

            contribution.addItem(new KongaMenuItem(action));
        }
    }

    private void publish() {
        Menu menu = getFileMenu();
        menu.addExtension(FILE_MENU_EXTENSION_POINT, contribution);
        JMenu jmenu = getFileJMenu();
        if (jmenu != null) {
            menu.populate(jmenu);
        }
    }
View Full Code Here

        menuExtensionManagers = Maps.newHashMap();
    }

    public void buildMenu(List<ViewShell> shells) {
        MenuManager menuMgr = appWin.getMenuManager();
        Menu viewMenu = menuMgr.getMenu(ApplicationWindowMenus.VIEW);
        if (viewMenu == null) {
            // HACK: The application does not have a View menu. Ideally, this method
            // should not be called at all in that case.
            return;
        }
View Full Code Here

                existingItems.addAll(newItemsClone);
            }
        }

        public void populateMenu(MenuManager menus) {
            Menu m = menus.getMenu(menuId);
            if (m == null) {
                return;
            }
            for (MenuExtensionPoint pt : MenuExtensionPoint.values()) {
                List<ViewMenuItemFactory> itemData = getItems(pt);
                if (itemData != null) {
                    MenuContribution contrib = new MenuContribution("ViewMenu." + pt.name());
                    for (ViewMenuItemFactory item : itemData) {
                        JMenuItem jm = item.createMenuItem(appWin);
                        if (jm != null) {
                            contrib.addItem(jm);
                        } else {
                            contrib.addSeparator();
                        }
                    }
                    m.addExtension(pt, contrib);
                }
            }
        }
View Full Code Here

        this.actions = actions;
    }

    @Override
    public JMenuItem createMenuItem(ApplicationWindow appWin) {
        Menu menu = new MenuImpl(actions);
        return menu.createJMenu(createDictionary());
    }
View Full Code Here

    @Override
    public void addMenuLevelExtensionsToWindow() {
        for (MenuExtension ext : extensions) {
            String id = ext.getMenuId();
            Menu menuToExtend = getMenuBar().getMenu(id);
            if (menuToExtend != null) {
                ext.addToMenu(menuToExtend);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.application.ui.menu.Menu

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.