" RootPanel rootPanel = RootPanel.get();",
" }",
"}");
refresh();
//
final WidgetInfo widget = createJavaInfo("com.google.gwt.user.client.ui.TextBox");
ExecutionUtils.run(frame, new RunnableEx() {
public void run() throws Exception {
flowContainer_CREATE(frame, widget, null);
widget.getSizeSupport().setSize(100, 50);
}
});
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" RootPanel rootPanel = RootPanel.get();",
" {",
" TextBox textBox = new TextBox();",
" rootPanel.add(textBox);",
" textBox.setSize('100px', '50px');",
" }",
" }",
"}");
// no tweaks for decorations, so (bounds, in contrast to client) size is bigger than asked
{
int margin = 0;
int border = 2;
int padding = 1;
assertEquals(100 + (margin + border + padding) * 2, widget.getBounds().width);
assertEquals(50 + (margin + border + padding) * 2, widget.getBounds().height);
}
}