Package org.jdesktop.wonderland.client.contextmenu

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


        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);
              }
          }
        }

        // show cell-specific standard items?
        if (settings.isDisplayCellStandard() && cmc != null) {
          // fetch standard factories from CMC
          ContextMenuFactorySPI factories[] = cmc.getContextMenuFactories();
          // add each item to the menu
          for (ContextMenuFactorySPI factory : factories) {
              ContextMenuItem items[] = factory.getContextMenuItems(event);
              for (ContextMenuItem item : items) {
                  addContextMenuItem(item, cell);
              }
          }
        }

        // show temporary items?

        if (settings.isDisplayTemporaryFactories()) {
          // fetch standard factories from CMC
          List<ContextMenuFactorySPI> factoryList = settings.getFactoryList();
          // 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


            item.setBackground(WL_GREEN);
            item.repaint();
            hideContextMenu();

            // Find the listener to dispatch the action to
            ContextMenuItem menuItem = menuItemMap.get(item);
            if (menuItem != null && menuItem instanceof SimpleContextMenuItem) {
                // Only deal with SimpleMenuItems for now
                SimpleContextMenuItem scmi = (SimpleContextMenuItem)menuItem;
                ContextMenuActionListener listener = scmi.getActionListener();
                if (listener != null) {
View Full Code Here

TOP

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

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.