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

Examples of com.google.gdt.eclipse.designer.smart.model.form.DynamicFormInfo


        "  }",
        "}");
  }

  public void test_setSize_update() throws Exception {
    DynamicFormInfo form =
        parseJavaInfo(
            "public class Test extends DynamicForm {",
            "  public Test() {",
            "    setItemLayout(FormLayoutType.ABSOLUTE);",
            "    FormItem field = new TextItem('field', 'Field');",
            "    field.setWidth(150);",
            "    field.setHeight(100);",
            "    setFields(new FormItem[] { field });",
            "  }",
            "}");
    form.refresh();
    //
    FormItemInfo item = form.getItems().get(0);
    form.command_BOUNDS(item, null, new Dimension(70, 30));
    form.refresh();
    // check bounds
    Rectangle bounds = item.getBounds();
    assertThat(bounds.getSize()).isEqualTo(new Dimension(70, 30));
    assertEditor(
        "public class Test extends DynamicForm {",
View Full Code Here


        "  }",
        "}");
  }

  public void test_setLocation_update() throws Exception {
    DynamicFormInfo form =
        parseJavaInfo(
            "public class Test extends DynamicForm {",
            "  public Test() {",
            "    setItemLayout(FormLayoutType.ABSOLUTE);",
            "    FormItem field = new TextItem('field', 'Field');",
            "    field.setLeft(70);",
            "    field.setTop(50);",
            "    setFields(new FormItem[] { field });",
            "  }",
            "}");
    form.refresh();
    //
    FormItemInfo item = form.getItems().get(0);
    form.command_BOUNDS(item, new Point(20, 10), null);
    form.refresh();
    // check bounds
    Rectangle bounds = item.getBounds();
    assertThat(bounds.getLocation()).isEqualTo(new Point(20, 10));
    assertEditor(
        "public class Test extends DynamicForm {",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.smart.model.form.DynamicFormInfo

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.