Package org.jdesktop.wonderland.client.contextmenu.cell

Examples of org.jdesktop.wonderland.client.contextmenu.cell.ContextMenuComponent


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

        // 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);
View Full Code Here


    /** list of temporary factories, displayed if not empty */
    private List<ContextMenuFactorySPI> factoryList = null;

    public ContextMenuInvocationSettings(Cell cell) {

        ContextMenuComponent cmc = null;
        if (cell != null) {
            menuName = cell.getName();
            // Look for the context component on the current Cell, we need to
            // intialize state for this event
            cmc = cell.getComponent(ContextMenuComponent.class);
        } else {
            menuName = "Menu";
        }



        if (cmc != null) {
            displayStandard = cmc.isShowStandardMenuItems();
        }
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.contextmenu.cell.ContextMenuComponent

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.