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

Examples of com.google.gdt.eclipse.designer.uibinder.model.widgets.menu.MenuItemSeparatorInfo$MenuItemImpl


        "<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);
        List<IMenuItemInfo> items = barObject.getItems();
        assertThat(items).hasSize(1);
        separatorObject = items.get(0);
      }
      // ask IMenuItemInfo directly
      assertNull(separator.getAdapter(List.class));
      assertSame(separatorObject, MenuObjectInfoUtils.getMenuItemInfo(separator));
      // model
      assertSame(separator, separatorObject.getModel());
      assertSame(separator, separatorObject.getToolkitModel());
      // presentation
View Full Code Here


    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
    MenuItemSeparatorInfo newSeparator =
        createObject("com.google.gwt.user.client.ui.MenuItemSeparator");
    assertTrue(barPolicy.validateCreate(newSeparator));
    barPolicy.commandCreate(newSeparator, null);
    assertXML(
        "// filler filler filler filler filler",
View Full Code Here

        "      <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()));
    assertTrue(barPolicy.validateMove(separator));
View Full Code Here

        "    <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(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.uibinder.model.widgets.menu.MenuItemSeparatorInfo$MenuItemImpl

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.