Package diva.gui.toolbox

Examples of diva.gui.toolbox.JContextMenu


        TreePath treePath = tree.getPathForLocation(e.getX(), e.getY());
        Object object = treePath.getLastPathComponent();

        if (object instanceof NamedObj) {
            NamedObj namedObj = (NamedObj) object;
            JContextMenu menu = new JContextMenu(namedObj, namedObj
                    .getFullName());
            Iterator i = menuItemFactoryList().iterator();

            while (i.hasNext()) {
                MenuItemFactory factory = (MenuItemFactory) i.next();
                factory.create(menu, namedObj);
            }

            menu.show(tree, e.getX(), e.getY());
            e.consume();
        }
    }
View Full Code Here


        if (object == null) {
            return null;
        }

        JContextMenu menu = new JContextMenu(object, object.getFullName());
        Iterator i = menuItemFactoryList().iterator();

        while (i.hasNext()) {
            MenuItemFactory factory = (MenuItemFactory) i.next();
            factory.create(menu, object);
View Full Code Here

                    contextMenu = contextMenu.getParent();
                }
            }
            if (contextMenu instanceof JContextMenu) {
                _sourceType = CONTEXTMENU_TYPE;
                JContextMenu menu = (JContextMenu) contextMenu;
                parent = menu.getInvoker();
                _target = (NamedObj) menu.getTarget();
                _x = item.getX();
                _y = item.getY();
            } else {
                // Not implicit location.. should there be?
                _sourceType = MENUBAR_TYPE;
View Full Code Here

TOP

Related Classes of diva.gui.toolbox.JContextMenu

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.