Package com.google.gdt.eclipse.designer.smart.model

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo


            "      Button button_2 = new Button();",
            "      addTile(button_2);",
            "    }",
            "  }",
            "}");
    CanvasInfo button_1 = getJavaInfoByName("button_1");
    CanvasInfo button_2 = getJavaInfoByName("button_2");
    layout.refresh();
    //
    FlowContainer flowContainer = new FlowContainerFactory(layout, true).get().get(0);
    assertTrue(flowContainer.validateComponent(button_2));
    assertTrue(flowContainer.validateReference(button_1));
View Full Code Here


  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_parse() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(new String[]{
            "public class Test implements EntryPoint {",
            "  public void onModuleLoad() {",
            "    Canvas canvas = new Canvas();",
            "    Menu menu = new Menu();",
            "    MenuItem menuItem = new MenuItem('MenuItem');",
            "    menu.setItems(menuItem);",
            "    canvas.setContextMenu(menu);",
            "    canvas.draw();",
            "  }",
            "}"});
    canvas.refresh();
    MenuInfo menu = canvas.getChildren(MenuInfo.class).get(0);
    //
    List<MenuItemInfo> items = menu.getItems();
    assertThat(items.size()).isEqualTo(1);
    MenuItemInfo item = items.get(0);
    assertThat(item.getSubmenu()).isNull();
View Full Code Here

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_CREATE() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "// filler filler filler",
            "public class Test extends Canvas {",
            "  public Test() {",
            "  }",
            "}");
    canvas.refresh();
    assertThat(canvas.getWidgets()).isEmpty();
    //
    LayoutInfo newLayout = createJavaInfo("com.smartgwt.client.widgets.layout.VLayout");
    canvas.command_absolute_CREATE(newLayout, null);
    assertEditor(
        "// filler filler filler",
        "public class Test extends Canvas {",
        "  public Test() {",
        "    {",
View Full Code Here

            "      Button button_2 = new Button();",
            "      addMember(button_2);",
            "    }",
            "  }",
            "}");
    CanvasInfo button_1 = getJavaInfoByName("button_1");
    CanvasInfo button_2 = getJavaInfoByName("button_2");
    layout.refresh();
    //
    FlowContainer flowContainer = new FlowContainerFactory(layout, true).get().get(0);
    assertTrue(flowContainer.validateComponent(button_2));
    assertTrue(flowContainer.validateReference(button_1));
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

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.