Package org.jdesktop.wonderland.client.contextmenu

Examples of org.jdesktop.wonderland.client.contextmenu.ContextMenuManager


        titlePanel.add(title);
        contextPanel.add(titlePanel);
        contextPanel.invalidate();
       
        // Fetch the manager of the context menu
        ContextMenuManager cmm = ContextMenuManager.getContextMenuManager();
       
        // fetch context menu component
        ContextMenuComponent cmc = cell.getComponent(ContextMenuComponent.class);
       
        // show standard menu items?
        if (settings.isDisplayStandard() == true) {
          // fetch standard items from CMM
          List<ContextMenuFactorySPI> factoryList = cmm.getContextMenuFactoryList();
          // add each item to the menu
          for (ContextMenuFactorySPI factory : factoryList) {
              ContextMenuItem items[] = factory.getContextMenuItems(event);
              for (ContextMenuItem item : items) {
                  addContextMenuItem(item, cell);
View Full Code Here


                            public void contextMenuDisplayed(
                                    ContextMenuEvent event) {
                                windowMenuDisplayed(event, contextMenuComp);
                            }
                        };
                        ContextMenuManager cmm =
                                ContextMenuManager.getContextMenuManager();
                        cmm.addContextMenuListener(menuListener);
                    }
                } else {
                    // If the cell has decreased to ACTIVE it is no longer
                    // visible and is no longer close enough to the viewer to be
                    // potentially viewable, so we release control of the app if
                    // it is controlled. We did a similar thing in 0.4
                    // Wonderland, where we released control on a teleport. But
                    // this is a more elegant solution.
                    if (app != null) {
                        ControlArb controlArb = app.getControlArb();
                        if (controlArb != null) {
                            if (controlArb.hasControl()) {
                                controlArb.releaseControl();
                            }
                        }
                    }
                }
                break;

            // The cell is no longer visible
            case DISK:
                if (!increasing) {
                    if (menuFactory != null) {
                        contextMenuComp.removeContextMenuFactory(menuFactory);
                        menuFactory = null;
                    }

                    if (menuListener != null) {
                        ContextMenuManager cmm =
                                ContextMenuManager.getContextMenuManager();
                        cmm.removeContextMenuListener(menuListener);
                        menuListener = null;
                    }

                    // issue #968: clean up the local visuals for this app cell,
                    // but don't remove it from the server
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.contextmenu.ContextMenuManager

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.