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

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


            "      add(bar);",
            "    }",
            "  }",
            "}");
    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


            "      add(bar);",
            "    }",
            "  }",
            "}");
    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

            "      add(bar);",
            "    }",
            "  }",
            "}");
    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

            "  }",
            "}");
    container.refresh();
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    // prepare MenuBarItem_Info
    MenuBarItemInfo item;
    {
      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
    {
      IMenuInfo barObject = MenuObjectInfoUtils.getMenuInfo(bar);
      assertSame(bar, barObject.getModel());
      assertSame(bar, barObject.getToolkitModel());
View Full Code Here

    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    IMenuPolicy policy = MenuObjectInfoUtils.getMenuInfo(bar).getPolicy();
    // don't accept anything other than MenuBarItem
    assertFalse(policy.validateCreate(new Object()));
    // create new MenuBarItem
    MenuBarItemInfo newItem = createJavaInfo("com.extjs.gxt.ui.client.widget.menu.MenuBarItem");
    assertTrue(policy.validateCreate(newItem));
    policy.commandCreate(newItem, null);
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
View Full Code Here

    container.refresh();
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    // prepare mementos
    List<JavaInfoMemento> mementos;
    {
      MenuBarItemInfo existingItem = bar.getItems().get(0);
      JavaInfoMemento memento = JavaInfoMemento.createMemento(existingItem);
      mementos = ImmutableList.of(memento);
    }
    // paste
    {
View Full Code Here

            "  }",
            "}");
    container.refresh();
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    IMenuPolicy policy = MenuObjectInfoUtils.getMenuInfo(bar).getPolicy();
    MenuBarItemInfo item_1 = bar.getItems().get(0);
    MenuBarItemInfo item_2 = bar.getItems().get(1);
    // invalid move
    assertFalse(policy.validateMove(new Object()));
    // move "item_2" before "item_1"
    {
      // validate
View Full Code Here

TOP

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

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.