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

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


    assertThat(bounds.x).isGreaterThanOrEqualTo(0);
    assertThat(bounds.y).isGreaterThanOrEqualTo(0);
  }

  public void test_parse_this() throws Exception {
    TileLayoutInfo layout =
        parseJavaInfo(
            "public class Test extends TileLayout {",
            "  public Test() {",
            "    {",
            "      Button button = new Button();",
            "      addTile(button);",
            "    }",
            "  }",
            "}");
    layout.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    Rectangle bounds = button.getBounds();
    assertThat(bounds.x).isEqualTo(5);
    assertThat(bounds.y).isEqualTo(5);
  }
View Full Code Here


            "  }",
            "}");
    canvas.refresh();
    assertThat(canvas.getWidgets()).isEmpty();
    //
    TileLayoutInfo newLayout = createJavaInfo("com.smartgwt.client.widgets.tile.TileLayout");
    canvas.command_absolute_CREATE(newLayout, null);
    assertEditor(
        "// filler filler filler",
        "public class Test extends Canvas {",
        "  public Test() {",
View Full Code Here

  //
  // Flow container
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_flowContainer_CREATE() throws Exception {
    TileLayoutInfo layout =
        parseJavaInfo(
            "// filler filler filler",
            "public class Test extends TileLayout {",
            "  public Test() {",
            "  }",
            "}");
    layout.refresh();
    // prepare FlowContainer
    FlowContainer flowContainer;
    {
      List<FlowContainer> flowContainers = new FlowContainerFactory(layout, true).get();
      assertThat(flowContainers).hasSize(1);
View Full Code Here

        "  }",
        "}");
  }

  public void test_flowContainer_MOVE() throws Exception {
    TileLayoutInfo layout =
        parseJavaInfo(
            "public class Test extends TileLayout {",
            "  public Test() {",
            "    setRect(0, 0, 350, 200);",
            "    {",
            "      Button button_1 = new Button();",
            "      addTile(button_1);",
            "    }",
            "    {",
            "      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));
    flowContainer.command_MOVE(button_2, button_1);
View Full Code Here

TOP

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

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.