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

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


            "    canvas.setWidth(250);",
            "    canvas.setHeight(200);",
            "    canvas.draw();",
            "  }",
            "}"});
    canvas.refresh();
    assertThat(canvas.getBounds()).isEqualTo(new Rectangle(0, 0, 250, 200));
  }

  /**
   * Test parse 'this'.
View Full Code Here


            "  public Test() {",
            "    setWidth(250);",
            "    setHeight(200);",
            "  }",
            "}"});
    canvas.refresh();
    assertThat(canvas.getBounds()).isEqualTo(new Rectangle(0, 0, 250, 200));
  }

  /**
   * We should unwrap <code>Element</code> when search SmartGWT widget in table.
View Full Code Here

            "      Button button_2 = new Button();",
            "      addChild(button_2);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button_1 = getJavaInfoByName("button_1");
    CanvasInfo button_2 = getJavaInfoByName("button_2");
    assertThat(canvas.getWidgets()).containsExactly(button_1, button_2);
  }
View Full Code Here

            "public class Test extends Canvas {",
            "  public Test() {",
            "    setBorder('1px solid red');",
            "  }",
            "}");
    canvas.refresh();
    // "red" border should be at (0,0)
    {
      Image image = canvas.getImage();
      RGB rgb = getPixelRGB(image, 0, 0);
      assertRGB(rgb, 0xFF, 0x00, 0x00);
View Full Code Here

            "      button.setTop(50);",
            "      addChild(button);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    // check that location applied
    Rectangle bounds = button.getBounds();
    assertThat(bounds.x).isEqualTo(100);
    assertThat(bounds.y).isEqualTo(50);
View Full Code Here

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

            "    canvas.addChild(toolStrip);",
            "    toolStrip.setRect(35, 25, 200, 200);",
            "    canvas.draw();",
            "  }",
            "}"});
    canvas.refresh();
    // check ToolStrip
    ToolStripInfo toolStrip = canvas.getChildren(ToolStripInfo.class).get(0);
    assertThat(toolStrip.isHorizontal()).isFalse();
    // check children
    assertThat(toolStrip.getChildrenReal().size()).isEqualTo(4);
View Full Code Here

            "    canvas.addChild(toolStrip);",
            "    toolStrip.setRect(35, 25, 200, 200);",
            "    canvas.draw();",
            "  }",
            "}"});
    canvas.refresh();
    // check ToolStrip
    ToolStripInfo toolStrip = canvas.getChildren(ToolStripInfo.class).get(0);
    assertThat(toolStrip.isHorizontal()).isTrue();
    List<AbstractComponentInfo> children = toolStrip.getChildren(AbstractComponentInfo.class);
    assertThat(children.size()).isEqualTo(4);
View Full Code Here

            "    canvas.addChild(toolStrip);",
            "    toolStrip.setRect(35, 25, 200, 200);",
            "    canvas.draw();",
            "  }",
            "}"});
    canvas.refresh();
    return canvas.getChildren(ToolStripInfo.class).get(0);
  }
}
View Full Code Here

            "    form.setFields(new FormItem[] { new TextItem('newTextItem'), new DateItem('newDateItem')});",
            "    canvas.addChild(form);",
            "    canvas.draw();",
            "  }",
            "}");
    canvas.refresh();
    DynamicFormInfo form = canvas.getChildren(DynamicFormInfo.class).get(0);
    List<FormItemInfo> items = form.getItems();
    assertThat(items.size()).isEqualTo(2);
    // create new form
    DynamicFormInfo newForm = createJavaInfo("com.smartgwt.client.widgets.form.DynamicForm");
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.