assertEquals(0, flowData.getMarginBottom());
assertEquals(0, flowData.getMarginLeft());
}
public void test_getMargin() throws Exception {
LayoutContainerInfo container =
parseJavaInfo(
"public class Test extends LayoutContainer {",
" public Test() {",
" setLayout(new FlowLayout());",
" {",
" Button button = new Button();",
" add(button, new FlowData(1, 2, 3, 4));",
" }",
" }",
"}");
container.refresh();
WidgetInfo button = container.getWidgets().get(0);
FlowDataInfo flowData = FlowLayoutInfo.getFlowData(button);
// check margins
assertEquals(1, flowData.getMarginTop());
assertEquals(2, flowData.getMarginRight());
assertEquals(3, flowData.getMarginBottom());