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

Examples of com.google.gdt.eclipse.designer.uibinder.model.widgets.menu.MenuBarInfo


        "<ui:UiBinder>",
        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='bar'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    MenuBarInfo bar = getObjectByName("bar");
    IMenuInfo barObject = MenuObjectInfoUtils.getMenuInfo(bar);
    IMenuPolicy policy = barObject.getPolicy();
    // don't accept something other than MenuItem
    assertFalse(policy.validateCreate(new Object()));
    // create new MenuItem
View Full Code Here


        "<ui:UiBinder>",
        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='bar'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    MenuBarInfo bar = getObjectByName("bar");
    IMenuPolicy policy = MenuObjectInfoUtils.getMenuInfo(bar).getPolicy();
    // use "field initializer"
    {
      GenerationSettings generationSettings =
          GwtToolkitDescription.INSTANCE.getGenerationSettings();
View Full Code Here

        "    <g:MenuBar wbp:name='bar'/>",
        "    <g:Button wbp:name='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    MenuBarInfo bar = getObjectByName("bar");
    WidgetInfo button = getObjectByName("button");
    // validate
    IMenuPolicy policy = MenuObjectInfoUtils.getMenuInfo(bar).getPolicy();
    // Object can not be pasted (not list of memento at all)
    assertFalse(policy.validatePaste(new Object()));
View Full Code Here

        "      <g:MenuItem wbp:name='item' text='My item'/>",
        "    </g:MenuBar>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    MenuBarInfo bar = getObjectByName("bar");
    // prepare memento
    List<XmlObjectMemento> mementos;
    {
      MenuItemInfo existingItem = getObjectByName("item");
      XmlObjectMemento memento = XmlObjectMemento.createMemento(existingItem);
View Full Code Here

        "  <g:MenuBar wbp:name='bar'>",
        "    <g:MenuItem wbp:name='item_1' text='A'>",
        "      <g:MenuBar wbp:name='subMenu_1'>",
        "    <g:MenuItem wbp:name='item_2' text='B'>",
        "      <g:MenuBar wbp:name='subMenu_2'>");
    MenuBarInfo bar = getObjectByName("bar");
    MenuItemInfo item_1 = getObjectByName("item_1");
    MenuItemInfo item_2 = getObjectByName("item_2");
    // can not move "bar" on "subMenu_1"
    {
      MenuBarInfo subMenu_1 = item_1.getSubMenu();
      IMenuInfo subMenuObject_1 = MenuObjectInfoUtils.getMenuInfo(subMenu_1);
      assertFalse(subMenuObject_1.getPolicy().validateMove(bar));
    }
    // move "item_2" before "item_1"
    {
View Full Code Here

        "<g:FlowPanel>",
        "  <g:MenuBar wbp:name='bar'>",
        "    <g:MenuItem wbp:name='subMenuItem' text='A'>",
        "      <g:MenuBar wbp:name='subMenu'>",
        "    <g:MenuItem wbp:name='separateItem' text='B'>");
    MenuBarInfo subMenu = getObjectByName("subMenu");
    MenuItemInfo separateItem = getObjectByName("separateItem");
    // can reparent "separateItem" to "subMenu"
    IMenuInfo subMenuObject = MenuObjectInfoUtils.getMenuInfo(subMenu);
    assertTrue(subMenuObject.getPolicy().validateMove(separateItem));
    subMenuObject.getPolicy().commandMove(separateItem, null);
View Full Code Here

        "<ui:UiBinder>",
        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='bar'>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    MenuBarInfo panel = getObjectByName("bar");
    //
    loadButton();
    canvas.moveTo(panel, 10, 10).click();
    assertXML(
        "<ui:UiBinder>",
View Full Code Here

        "<ui:UiBinder>",
        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='menuBar'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    MenuBarInfo menuBar = getObjectByName("menuBar");
    //
    MenuItemInfo newItem = loadCreationTool("com.google.gwt.user.client.ui.MenuItem");
    canvas.moveTo(menuBar, 5, 0.5).click();
    assertXML(
        "// filler filler filler filler filler",
View Full Code Here

        "<ui:UiBinder>",
        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='menuBar'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    MenuBarInfo menuBar = getObjectByName("menuBar");
    //
    MenuItemSeparatorInfo newSeparator =
        loadCreationTool("com.google.gwt.user.client.ui.MenuItemSeparator");
    canvas.moveTo(menuBar, 5, 0.5).click();
    assertXML(
View Full Code Here

        "<ui:UiBinder>",
        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='menuBar'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    MenuBarInfo menuBar = getObjectByName("menuBar");
    //
    loadCreationTool("com.google.gwt.user.client.ui.MenuItem", "withSubMenu");
    canvas.moveTo(menuBar, 5, 0.5).click();
    assertXML(
        "// filler filler filler filler filler",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.uibinder.model.widgets.menu.MenuBarInfo

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.