"}");
assertNoErrors(panel);
assertInstanceOf(AnchorLayoutInfo.class, panel.getLayout());
//
WidgetInfo label = panel.getChildrenWidgets().get(0);
AnchorLayoutDataInfo anchorData = AnchorLayoutInfo.getAnchorData(label);
assertNotNull(anchorData);
assertSame(Property.UNKNOWN_VALUE, anchorData.getAnchor());
// AnchorLayoutData_Info always has "anchor" property
Property property = anchorData.getPropertyByTitle("anchor");
assertNotNull(property);
assertFalse(property.isModified());
// set value
property.setValue("-50 30%");
assertEditor(
"public class Test extends Panel {",
" public Test() {",
" setLayout(new AnchorLayout());",
" {",
" Label label = new Label();",
" add(label, new AnchorLayoutData('-50 30%'));",
" }",
" }",
"}");
assertTrue(property.isModified());
assertEquals("-50 30%", property.getValue());
assertEquals("-50 30%", anchorData.getAnchor());
}