" panel.add(button, DockPanel.WEST);",
" }",
" }",
"}");
frame.refresh();
DockPanelInfo panel = (DockPanelInfo) frame.getChildrenWidgets().get(0);
WidgetInfo button = panel.getChildrenWidgets().get(0);
// check that "Direction" property exists
Property directionProperty;
{
directionProperty = button.getPropertyByTitle("Direction");
assertNotNull(directionProperty);
// same instance each time
assertSame(directionProperty, button.getPropertyByTitle("Direction"));
// presentation
assertEquals("Direction", directionProperty.getTitle());
assertTrue(directionProperty.getCategory().isSystem());
assertTrue(directionProperty.isModified());
}
// current value
assertEquals("WEST", getPropertyText(directionProperty));
// set new value
{
Object northObject = ReflectionUtils.getFieldObject(panel.getObject(), "NORTH");
directionProperty.setValue(northObject);
}
assertEditor(
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",