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

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


        "      MenuBar menuBar = new MenuBar(false);",
        "      add(menuBar);",
        "    }",
        "  }",
        "}");
    MenuBarInfo menuBar = getJavaInfoByName("menuBar");
    //
    MenuItemInfo newItem = loadCreationTool("com.google.gwt.user.client.ui.MenuItem");
    canvas.moveTo(menuBar, 5, 0.5).click();
    assertEditor(
        "// filler filler filler filler filler",
View Full Code Here


        "      MenuBar menuBar = new MenuBar(false);",
        "      add(menuBar);",
        "    }",
        "  }",
        "}");
    MenuBarInfo menuBar = getJavaInfoByName("menuBar");
    //
    MenuItemSeparatorInfo newSeparator =
        loadCreationTool("com.google.gwt.user.client.ui.MenuItemSeparator");
    canvas.moveTo(menuBar, 5, 0.5).click();
    assertEditor(
View Full Code Here

        "      MenuBar menuBar = new MenuBar(false);",
        "      add(menuBar);",
        "    }",
        "  }",
        "}");
    MenuBarInfo menuBar = getJavaInfoByName("menuBar");
    //
    loadCreationTool("com.google.gwt.user.client.ui.MenuItem", "withSubMenu");
    canvas.moveTo(menuBar, 5, 0.5).click();
    assertEditor(
        "// filler filler filler filler filler",
View Full Code Here

        "      }",
        "    }",
        "  }",
        "}");
    MenuItemInfo subMenuItem = getJavaInfoByName("subMenuItem");
    MenuBarInfo subMenu = getJavaInfoByName("subMenu");
    //
    loadCreationTool("com.google.gwt.user.client.ui.MenuItem");
    // initially no EditPart for "subMenu"
    canvas.assertNullEditPart(subMenu);
    // move on "subMenuItem", show "subMenu"
View Full Code Here

        "      MenuBar menuBar = new MenuBar(false);",
        "      add(menuBar);",
        "    }",
        "  }",
        "}");
    MenuBarInfo menuBar = getJavaInfoByName("menuBar");
    //
    loadCreationTool("com.google.gwt.user.client.ui.MenuItem");
    tree.moveOn(menuBar).click();
    assertEditor(
        "// filler filler filler filler filler",
View Full Code Here

        "    MenuBar bar = new MenuBar();",
        "    rootPanel.add(bar);",
        "  }",
        "}");
    refresh();
    MenuBarInfo bar = getJavaInfoByName("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

        "    rootPanel.add(bar);",
        "  }",
        "}");
    refresh();
    //
    MenuBarInfo bar = getJavaInfoByName("bar");
    assertEquals(false, ReflectionUtils.invokeMethod(bar.getObject(), "isAnimationEnabled()"));
  }
View Full Code Here

    refresh();
    assertHierarchy(
        "{RootPanel.get()} {local-unique: rootPanel} {/RootPanel.get()/ /rootPanel.add(bar)/}",
        "  {new: com.google.gwt.user.client.ui.MenuBar} {local-unique: bar} {/new MenuBar()/ /rootPanel.add(bar)/ /bar.addItem(menuItem)/}",
        "    {new: com.google.gwt.user.client.ui.MenuItem} {local-unique: menuItem} {/new MenuItem('A', (Command) null)/ /bar.addItem(menuItem)/}");
    MenuBarInfo bar = getJavaInfoByName("bar");
    MenuItemInfo item = bar.getItems().get(0);
    // association
    assertInstanceOf(InvocationChildAssociation.class, item.getAssociation());
    // only item in "bar"
    assertThat(bar.getAllItems()).containsOnly(item);
    // check "Constructor" property
    {
      assertNotNull(PropertyUtils.getByPath(item, "Constructor/text"));
      assertNotNull(PropertyUtils.getByPath(item, "Constructor/cmd"));
    }
View Full Code Here

    refresh();
    assertHierarchy(
        "{RootPanel.get()} {local-unique: rootPanel} {/RootPanel.get()/ /rootPanel.add(bar)/}",
        "  {new: com.google.gwt.user.client.ui.MenuBar} {local-unique: bar} {/new MenuBar()/ /rootPanel.add(bar)/ /bar.addItem('A', (Command) null)/}",
        "    {implicit-factory} {empty} {/bar.addItem('A', (Command) null)/}");
    MenuBarInfo bar = getJavaInfoByName("bar");
    MenuItemInfo item = bar.getItems().get(0);
    // association
    assertInstanceOf(InvocationVoidAssociation.class, item.getAssociation());
    // only item in "bar"
    assertThat(bar.getAllItems()).containsOnly(item);
    // check "Factory" property
    {
      assertNotNull(PropertyUtils.getByPath(item, "Factory/text"));
      assertNotNull(PropertyUtils.getByPath(item, "Factory/cmd"));
    }
View Full Code Here

    assertHierarchy(
        "{RootPanel.get()} {local-unique: rootPanel} {/RootPanel.get()/ /rootPanel.add(bar)/}",
        "  {new: com.google.gwt.user.client.ui.MenuBar} {local-unique: bar} {/new MenuBar()/ /rootPanel.add(bar)/ /bar.addItem('Sub', subMenu)/}",
        "    {implicit-factory} {empty} {/bar.addItem('Sub', subMenu)/}",
        "      {new: com.google.gwt.user.client.ui.MenuBar} {local-unique: subMenu} {/new MenuBar(false)/ /bar.addItem('Sub', subMenu)/}");
    MenuBarInfo bar = getJavaInfoByName("bar");
    MenuItemInfo item = bar.getItems().get(0);
    MenuBarInfo subMenu = item.getSubMenu();
    assertThat(subMenu.getAssociation()).isInstanceOf(ImplicitFactoryArgumentAssociation.class);
    // clipboard
    assertClipboardSource(
        item,
        "%parent%.addItem(\"Sub\", (com.google.gwt.user.client.ui.MenuBar) null)");
  }
View Full Code Here

TOP

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

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.