" }",
"}");
canvas.refresh();
CanvasInfo button = getJavaInfoByName("button");
//
Property boundsProperty = button.getPropertyByTitle("Bounds");
assertNotNull(boundsProperty);
// x
{
Property xProperty = PropertyUtils.getByPath(button, "Bounds/x");
assertNotNull(xProperty);
assertEquals(1, xProperty.getValue());
xProperty.setValue(10);
assertEditor(
"public class Test extends Canvas {",
" public Test() {",
" {",
" Button button = new Button();",
" addChild(button);",
" button.setRect(10, 2, 3, 4);",
" }",
" }",
"}");
}
// y
{
Property yProperty = PropertyUtils.getByPath(button, "Bounds/y");
assertNotNull(yProperty);
assertEquals(2, yProperty.getValue());
yProperty.setValue(20);
assertEditor(
"public class Test extends Canvas {",
" public Test() {",
" {",
" Button button = new Button();",
" addChild(button);",
" button.setRect(10, 20, 3, 4);",
" }",
" }",
"}");
}
// width
{
Property widthProperty = PropertyUtils.getByPath(button, "Bounds/width");
assertNotNull(widthProperty);
assertEquals(3, widthProperty.getValue());
widthProperty.setValue(30);
assertEditor(
"public class Test extends Canvas {",
" public Test() {",
" {",
" Button button = new Button();",
" addChild(button);",
" button.setRect(10, 20, 30, 4);",
" }",
" }",
"}");
}
// height
{
Property heightProperty = PropertyUtils.getByPath(button, "Bounds/height");
assertNotNull(heightProperty);
assertEquals(4, heightProperty.getValue());
heightProperty.setValue(40);
assertEditor(
"public class Test extends Canvas {",
" public Test() {",
" {",
" Button button = new Button();",