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

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


    DynamicFormInfo form = parseJavaInfo( // filler
        "public class Test extends DynamicForm {",
        "  public Test() {",
        "  }",
        "}");
    form.refresh();
    // create field
    FormItemInfo newField = createJavaInfo("com.smartgwt.client.widgets.form.fields.TextItem");
    form.command_CREATE(newField, null);
    //
    assertEditor(
View Full Code Here


            "public class Test extends DynamicForm {",
            "  public Test() {",
            "    setFields(new FormItem[] { new TextItem('newTextItem'), new DateItem('newDateItem')});",
            "  }",
            "}");
    form.refresh();
    //
    List<FormItemInfo> fields = form.getItems();
    FormItemInfo textField = fields.get(0);
    FormItemInfo dateField = fields.get(1);
    // move field
View Full Code Here

        "  public Test() {",
        "    setItemLayout(FormLayoutType.ABSOLUTE);",
        "    setFields(new FormItem[] { new TextItem('newTextItem')});",
        "  }",
        "}");
    form.refresh();
    // set location
    FormItemInfo formItem = form.getItems().get(0);
    Point location = new Point(30, 20);
    form.command_BOUNDS(formItem, location, null);
    form.refresh();
View Full Code Here

    form.refresh();
    // set location
    FormItemInfo formItem = form.getItems().get(0);
    Point location = new Point(30, 20);
    form.command_BOUNDS(formItem, location, null);
    form.refresh();
    assertThat(formItem.getBounds().getLocation()).isEqualTo(location);
    assertEditor(
        "public class Test extends DynamicForm {",
        "  public Test() {",
        "    setItemLayout(FormLayoutType.ABSOLUTE);",
View Full Code Here

        "    setFields(new FormItem[] { textItem});",
        "  }",
        "}");
    // set size
    form.command_BOUNDS(formItem, null, new Dimension(60, 50));
    form.refresh();
    assertThat(formItem.getBounds().getSize()).isEqualTo(new Dimension(60, 50));
    assertEditor(
        "public class Test extends DynamicForm {",
        "  public Test() {",
        "    setItemLayout(FormLayoutType.ABSOLUTE);",
View Full Code Here

        "    setFields(new FormItem[] { textItem});",
        "  }",
        "}");
    // change location
    form.command_BOUNDS(formItem, new Point(10, 10), null);
    form.refresh();
    assertThat(formItem.getBounds().getLocation()).isEqualTo(new Point(10, 10));
    assertEditor(
        "public class Test extends DynamicForm {",
        "  public Test() {",
        "    setItemLayout(FormLayoutType.ABSOLUTE);",
View Full Code Here

    DynamicFormInfo form = parseJavaInfo( // filler
        "public class Test extends DynamicForm {",
        "  public Test() {",
        "  }",
        "}");
    form.refresh();
    // create field
    CanvasInfo newLabel = createJavaInfo("com.smartgwt.client.widgets.Label");
    form.command_CREATE(newLabel, null);
    assertThat(newLabel.getParent()).isInstanceOf(FormItemInfo.class);
    assertThat(newLabel.getParent().getParent()).isSameAs(form);
View Full Code Here

        "      canvasItem_2.setCanvas(button);",
        "    }",
        "    setFields(new FormItem[] { canvasItem_1, canvasItem_2 });",
        "  }",
        "}");
    form.refresh();
    //
    List<FormItemInfo> fields = form.getItems();
    CanvasItemInfo labelItem = (CanvasItemInfo) fields.get(0);
    CanvasItemInfo buttonItem = (CanvasItemInfo) fields.get(1);
    // move canvas
View Full Code Here

            "    FormItem field = new TextItem('field', 'Field');",
            "    form.setFields(new FormItem[] { field });",
            "    form.draw();",
            "  }",
            "}");
    form.refresh();
    //
    assertFalse(form.isAbsoluteItemLayout());
    List<FormItemInfo> list = form.getItems();
    assertEquals(1, list.size());
    List<ArrayObjectInfo> arrayInfos = form.getChildren(ArrayObjectInfo.class);
View Full Code Here

            "  public Test() {",
            "    FormItem field = new TextItem('field', 'Field');",
            "    setFields(new FormItem[] { field });",
            "  }",
            "}");
    form.refresh();
    //
    assertFalse(form.isAbsoluteItemLayout());
    List<FormItemInfo> list = form.getItems();
    assertEquals(1, list.size());
    List<ArrayObjectInfo> arrayInfos = form.getChildren(ArrayObjectInfo.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.