Package gov.nasa.arc.mct.gui

Examples of gov.nasa.arc.mct.gui.MenuItemInfo


      MenuSection allSection = sections.get(0);
      List<MenuItemInfo> allMenus = allSection.getMenuItemInfoList();
      Assert.assertNotNull(allMenus);
      Assert.assertEquals(allMenus.size(), 5);

      MenuItemInfo info = allMenus.get(0);
      Assert.assertEquals(info.getCommandKey(), DO_THIS);
      
        info = allMenus.get(1);
        Assert.assertEquals(info.getCommandKey(), DO_THAT);
     
        info = allMenus.get(2);
        Assert.assertEquals(info.getCommandKey(), DO_THESE);

        info = allMenus.get(3);
        Assert.assertEquals(info.getCommandKey(), DONT_DO_THIS_YET);

        info = allMenus.get(4);
        Assert.assertEquals(info.getCommandKey(), TEST_SUBMENU);

       
      MenuSection additionsSection = sections.get(1);
      List<MenuItemInfo> addtionsMenus = additionsSection.getMenuItemInfoList();
     
        info = addtionsMenus.get(0);
        Assert.assertEquals(info.getCommandKey(), DO_EXTRA);
  }
View Full Code Here


  }

  @Override
  protected void populate() {
        Collection<MenuItemInfo> infos = new ArrayList<MenuItemInfo>();
        infos.add(new MenuItemInfo("OBJECTS_SUBMENU_BEEP", MenuItemType.NORMAL));
        addMenuItemInfos(OBJECTS_SUBMENU_EXT, infos);
  }
View Full Code Here

   
    private class TestProvider extends AbstractComponentProvider {

        @Override
        public Collection<MenuItemInfo> getMenuItemInfos() {
            return Collections.<MenuItemInfo>singleton(new MenuItemInfo("test/additions", DO_EXTRA, MenuItemType.CHECKBOX, DoExtraAction.class));
        }
View Full Code Here

        super.fireMenuDeselected();
    }

    @Override
    protected void populate() {
        addMenuItemInfos("test/subs.ext", Collections.<MenuItemInfo>singleton(new MenuItemInfo("DO_SUBTASK", MenuItemType.NORMAL)));
    }
View Full Code Here

  }

    @Override
    protected void populate() {
        addMenuItemInfos(TEST_ALL_EXT, Arrays.asList(
                new MenuItemInfo("DO_THIS", MenuItemType.NORMAL),
                new MenuItemInfo("DO_THAT", MenuItemType.NORMAL),
                new MenuItemInfo("DO_THESE", MenuItemType.RADIO_GROUP),
                new MenuItemInfo("DONT_DO_THIS_YET", MenuItemType.NORMAL),
                new MenuItemInfo("TEST_SUBMENU", MenuItemType.SUBMENU)));       
    }
View Full Code Here

        // This    => /this/additions
        // Objects => /objects/additions
        // Help    => /help/additions
       
        // add menu items to help -- this will show up as a help topic for the example plugin
        new MenuItemInfo(
            "/help/additions", // NOI18N
            "ABOUT_EXAMPLE_ACTION", //NO18N
            MenuItemType.NORMAL,
            AboutExampleAction.class),
        // add menu item to the objects menu -- this will demonstrate programmatic creation for ExampleComponents
        new MenuItemInfo(
                "/objects/additions", // NOI18N
                "API_CREATION_ACTION", //NO18N
                MenuItemType.NORMAL,
                APICreationAction.class),
        // add menu item to the objects menu -- this will be inline as a radio button group under the objects menu
        new MenuItemInfo(
            "/objects/additions", //NOI18N
            "CHANGE_COLOR_ACTION", //NOI18N
            MenuItemType.RADIO_GROUP,
            AddOrRemoveNodeBorderAction.class),
        new MenuItemInfo(
            "/objects/additions", //NOI18N
            "SUBMENU", //NOI18N
            SubmenuMenu.class),
        new MenuItemInfo(
            "objects/submenu.ext", //NOI18N
            "OBJECTS_SUBMENU_BEEP", //NOI18N
            MenuItemType.NORMAL,
            BeepAction.class));
  }
View Full Code Here

        Assert.assertTrue(menuSections.size() > 1);
       
        // Quit should be at the bottom of the last section
        MenuSection lastSection = menuSections.get(menuSections.size() - 1);
        List<MenuItemInfo> infos = lastSection.getMenuItemInfoList();
        MenuItemInfo lastMenuItem = infos.get(infos.size() - 1);
        Assert.assertTrue(lastMenuItem.getCommandKey().equals("QUIT_ACTION"));
    }
View Full Code Here

 
  @Override
  //Add menu items for creating multi with puis selected in My Directory
  public Collection<MenuItemInfo> getMenuItemInfos() {
    return Arrays.asList(
        new MenuItemInfo("/objects/creation.ext", "OBJECTS_CREATE_MULTIS",
                        MenuItemType.NORMAL, PlaceObjectsInMultiAction.class));
   
  }
View Full Code Here

 
  @Override
  //Add menu items for creating enums with puis selected in My Directory
  public Collection<MenuItemInfo> getMenuItemInfos() {
    return Arrays.asList(
        new MenuItemInfo("/objects/creation.ext", "OBJECTS_CREATE_ENUMS",
                        MenuItemType.NORMAL, PlaceObjectsInEnumAction.class));
   
  }
View Full Code Here

  }

  @Override
  protected void populate() {
    Collection<MenuItemInfo> infos = new ArrayList<MenuItemInfo>();
    infos.add(new MenuItemInfo("IMPORT_MCT_ACTION", MenuItemType.NORMAL));
    infos.add(new MenuItemInfo("IMPORT_ACTION", MenuItemType.NORMAL));
    infos.add(new MenuItemInfo("IMPORT_ELOG_ACTION", MenuItemType.NORMAL));
    infos.add(new MenuItemInfo("LOAD_COMPUTATIONALS_ACTION",
        MenuItemType.NORMAL));
    addMenuItemInfos(OBJECTS_SUBMENU_EXT, infos);
  }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.gui.MenuItemInfo

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.