Package com.google.gdt.eclipse.designer.gxt.model.widgets.menu

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.menu.MenuInfo


            "    }",
            "  }",
            "}");
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    MenuBarItemInfo barItem = bar.getItems().get(0);
    MenuInfo menu = barItem.getSubMenu();
    // drop MenuItem
    JavaInfo newItem = loadCreationTool("com.extjs.gxt.ui.client.widget.menu.MenuItem");
    // "menu" not open
    canvas.assertNullEditPart(menu);
    // open "menu"
View Full Code Here


            "    }",
            "  }",
            "}");
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    MenuBarItemInfo barItem = bar.getItems().get(0);
    MenuInfo menu = barItem.getSubMenu();
    // drop MenuItem
    JavaInfo newItem = loadCreationTool("com.extjs.gxt.ui.client.widget.menu.MenuItem");
    m_viewerTree.expandAll();
    tree.moveOn(menu);
    tree.assertFeedback_on(menu);
View Full Code Here

            "    }",
            "  }",
            "}");
    String source = m_lastEditor.getSource();
    MenuBarItemInfo item = getJavaInfoByName("item");
    MenuInfo menu = item.getSubMenu();
    //
    canvas.click(item);
    canvas.beginDrag(menu).dragTo(container, 100, 150).endDrag();
    // no changes
    assertEditor(source, m_lastEditor);
View Full Code Here

            "      Menu menu = new Menu();",
            "      setContextMenu(menu);",
            "    }",
            "  }",
            "}");
    MenuInfo menu = getJavaInfoByName("menu");
    //
    String source = m_lastEditor.getSource();
    canvas.beginDrag(menu).dragTo(container, 100, 100).endDrag();
    assertEditor(source, m_lastEditor);
  }
View Full Code Here

      List<MenuBarItemInfo> items = bar.getItems();
      assertThat(items).hasSize(1);
      item = items.get(0);
    }
    // prepare Menu_Info, child of "item"
    MenuInfo subMenu = item.getSubMenu();
    assertNotNull(subMenu);
    assertTrue(subMenu.isSubMenu());
    // get unsupported adaptable
    assertNull(bar.getAdapter(String.class));
    assertNull(item.getAdapter(String.class));
    // IMenuInfo
    {
View Full Code Here

    assertHierarchy(
        "{this: com.extjs.gxt.ui.client.widget.LayoutContainer} {this} {/add(menu)/}",
        "  {implicit-layout: default} {implicit-layout} {}",
        "  {new: com.extjs.gxt.ui.client.widget.menu.ColorMenu} {local-unique: menu} {/new ColorMenu()/ /add(menu)/}");
    // ColorMenu shows "shadow" in wrong position, so we disable this
    MenuInfo menu = (MenuInfo) container.getWidgets().get(0);
    assertEquals(false, ReflectionUtils.invokeMethod(menu.getObject(), "getShadow()"));
  }
View Full Code Here

    assertHierarchy(
        "{this: com.extjs.gxt.ui.client.widget.LayoutContainer} {this} {/add(menu)/}",
        "  {implicit-layout: default} {implicit-layout} {}",
        "  {new: com.extjs.gxt.ui.client.widget.menu.DateMenu} {local-unique: menu} {/new DateMenu()/ /add(menu)/}");
    // DateMenu shows "shadow" in wrong position, so we disable this
    MenuInfo menu = (MenuInfo) container.getWidgets().get(0);
    assertEquals(false, ReflectionUtils.invokeMethod(menu.getObject(), "getShadow()"));
  }
View Full Code Here

        "    {new: com.extjs.gxt.ui.client.widget.menu.MenuBarItem} {local-unique: menuBarItem} {/new MenuBarItem('MenuBarItem', menu)/ /bar.add(menuBarItem)/}",
        "      {new: com.extjs.gxt.ui.client.widget.menu.Menu} {local-unique: menu} {/new Menu()/ /menu.add(item)/ /new MenuBarItem('MenuBarItem', menu)/}",
        "        {new: com.extjs.gxt.ui.client.widget.menu.MenuItem} {local-unique: item} {/new MenuItem('A')/ /menu.add(item)/}");
    container.refresh();
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    MenuInfo menu = bar.getItems().get(0).getSubMenu();
    IMenuInfo menuObject = MenuObjectInfoUtils.getMenuInfo(menu);
    ComponentInfo item = menu.getItems().get(0);
    // get unsupported adaptable
    assertNull(menu.getAdapter(String.class));
    assertSame(menu, menuObject.getModel());
    // presentation
    {
      // we should prepare image for Menu
      {
View Full Code Here

        "  {implicit-layout: default} {implicit-layout} {}",
        "  {new: com.extjs.gxt.ui.client.widget.button.Button} {local-unique: button} {/new Button()/ /add(button)/ /button.setMenu(menu)/}",
        "    {new: com.extjs.gxt.ui.client.widget.menu.Menu} {local-unique: menu} {/new Menu()/ /button.setMenu(menu)/}");
    container.refresh();
    ComponentInfo button = (ComponentInfo) container.getWidgets().get(0);
    MenuInfo menu = button.getChildren(MenuInfo.class).get(0);
    assertFalse(menu.isSubMenu());
    // IMenuPopupInfo
    IMenuPopupInfo popupObject = MenuObjectInfoUtils.getMenuPopupInfo(menu);
    assertSame(menu, popupObject.getModel());
    // presentation
    {
      // use icon as "popup" image
      {
        Image image = popupObject.getImage();
        assertSame(menu.getDescription().getIcon(), image);
      }
      // some reasonable bounds
      {
        Rectangle bounds = popupObject.getBounds();
        assertThat(bounds.width).isEqualTo(16);
View Full Code Here

        "    {new: com.extjs.gxt.ui.client.widget.menu.MenuBarItem} {local-unique: menuBarItem} {/new MenuBarItem('MenuBarItem', menu)/ /bar.add(menuBarItem)/}",
        "      {new: com.extjs.gxt.ui.client.widget.menu.Menu} {local-unique: menu} {/new Menu()/ /menu.add(button)/ /new MenuBarItem('MenuBarItem', menu)/}",
        "        {new: com.extjs.gxt.ui.client.widget.button.Button} {local-unique: button} {/new Button()/ /menu.add(button)/}");
    container.refresh();
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    MenuInfo menu = bar.getItems().get(0).getSubMenu();
    IMenuInfo menuObject = MenuObjectInfoUtils.getMenuInfo(menu);
    ComponentInfo button = menu.getItems().get(0);
    // IMenuItem-s
    {
      List<IMenuItemInfo> items = menuObject.getItems();
      assertThat(items).hasSize(1);
      IMenuItemInfo item = items.get(0);
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gxt.model.widgets.menu.MenuInfo

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.