" rootPanel.add(widget);",
" }",
" }",
"}");
refresh();
WidgetInfo widget = getJavaInfoByName("widget");
// decorations
assertEquals(new Insets(2), widget.getMargins());
assertEquals(new Insets(3), widget.getBorders());
assertEquals(new Insets(4), widget.getPaddings());
// set new size, tweak to take decorations into account
widget.getSizeSupport().setSize(100, 50);
assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
// source
int clientWidth = 100 - (2 + 3 + 4) * 2;
int clientHeight = 50 - (2 + 3 + 4) * 2;
assertEditor(
"public class Test implements EntryPoint {",