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

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


        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='bar'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    MenuBarInfo bar = getObjectByName("bar");
    //
    assertThat(bar.getItems()).isEmpty();
    assertThat(bar.getAllItems()).isEmpty();
    assertThat(bar.getBounds().width).isGreaterThan(100);
    assertThat(bar.getBounds().height).isGreaterThan(20);
  }
View Full Code Here


        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='bar' animationEnabled='true'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    MenuBarInfo bar = getObjectByName("bar");
    //
    assertEquals(false, ReflectionUtils.invokeMethod(bar.getObject(), "isAnimationEnabled()"));
  }
View Full Code Here

        "// filler filler filler filler filler",
        "<g:FlowPanel>",
        "  <g:MenuBar wbp:name='bar'>",
        "    <g:MenuItem wbp:name='item' text='A'>");
    refresh();
    MenuBarInfo bar = getObjectByName("bar");
    MenuItemInfo item = getObjectByName("item");
    // only item in "bar"
    assertThat(bar.getAllItems()).containsOnly(item);
    // check "text" property
    Property textProperty = item.getPropertyByTitle("text");
    assertEquals("A", textProperty.getValue());
    textProperty.setValue("B");
    assertXML(
View Full Code Here

        "  <g:MenuBar wbp:name='bar'>",
        "    <g:MenuItem wbp:name='item' text='Sub'>",
        "      <g:MenuBar wbp:name='subMenu'>");
    refresh();
    MenuItemInfo item = getObjectByName("item");
    MenuBarInfo subMenu = getObjectByName("subMenu");
    assertSame(subMenu, item.getSubMenu());
  }
View Full Code Here

        "// filler filler filler filler filler",
        "<g:FlowPanel>",
        "  <g:MenuBar wbp:name='bar'>",
        "    <g:MenuItemSeparator wbp:name='separator'>");
    refresh();
    MenuBarInfo bar = getObjectByName("bar");
    MenuItemSeparatorInfo separator = getObjectByName("separator");
    // only separator in "bar"
    assertThat(bar.getAllItems()).containsOnly(separator);
    // IMenuItemInfo
    {
      IMenuItemInfo separatorObject;
      {
        IMenuInfo barObject = MenuObjectInfoUtils.getMenuInfo(bar);
View Full Code Here

        "      <g:MenuBar vertical='true'>",
        "        <g:MenuItem text='Sub item 1'>",
        "        <g:MenuItem text='Sub item 2'>",
        "    <g:MenuItem text='Separate item'>");
    refresh();
    MenuBarInfo menu = getObjectByName("bar");
    MenuItemInfo item_1 = menu.getItems().get(0);
    MenuItemInfo item_2 = menu.getItems().get(1);
    MenuBarInfo subMenu = item_1.getSubMenu();
    MenuItemInfo subMenuItem_1 = subMenu.getItems().get(0);
    MenuItemInfo subMenuItem_2 = subMenu.getItems().get(1);
    // bad adapters
    {
      assertNull(menu.getAdapter(List.class));
      assertNull(item_1.getAdapter(List.class));
    }
View Full Code Here

        "<g:FlowPanel>",
        "  <g:MenuBar wbp:name='bar'>",
        "    <g:MenuItem wbp:name='item' text='Sub'>",
        "      <g:MenuBar wbp:name='subMenu'>");
    refresh();
    MenuBarInfo subMenu = getObjectByName("subMenu");
    // delete "subMenu", fortunately "item" can exists without it, so keep it
    subMenu.delete();
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
        "  <g:FlowPanel>",
        "    <g:MenuBar wbp:name='bar'>",
View Full Code Here

        "        <g:MenuBar wbp:name='subMenu'/>",
        "      </g:MenuItem>",
        "    </g:MenuBar>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    MenuBarInfo bar = getObjectByName("bar");
    // delete "bar" fully
    bar.delete();
    assertXML(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
        "  <g:FlowPanel/>",
View Full Code Here

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

        "      <g:MenuItemSeparator wbp:name='separator'/>",
        "      <g:MenuItem/>",
        "    </g:MenuBar>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    MenuBarInfo bar = getObjectByName("bar");
    MenuItemSeparatorInfo separator = getObjectByName("separator");
    IMenuInfo barObject = MenuObjectInfoUtils.getMenuInfo(bar);
    IMenuPolicy barPolicy = barObject.getPolicy();
    // don't accept something other than MenuItem or MenuItemSeparator
    assertFalse(barPolicy.validateMove(new Object()));
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.