"{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new ColumnLayout())/ /add(label)/}",
" {new: com.gwtext.client.widgets.layout.ColumnLayout} {empty} {/setLayout(new ColumnLayout())/}",
" {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label)/}",
" {virtual-layout_data: com.gwtext.client.widgets.layout.ColumnLayoutData} {virtual-layout-data} {}");
WidgetInfo label = panel.getChildrenWidgets().get(0);
ColumnLayoutDataInfo layoutData = ColumnLayoutInfo.getColumnData(label);
assertNotNull(layoutData);
// set width
{
layoutData.setWidth(0.2);
assertEditor(
"public class Test extends Panel {",
" public Test() {",
" setLayout(new ColumnLayout());",
" {",
" Label label = new Label();",
" add(label, new ColumnLayoutData(0.2));",
" }",
" }",
"}");
}
// ColumnLayoutData should have top level "width" property
{
Property widthProperty = layoutData.getPropertyByTitle("width");
assertNotNull(widthProperty);
assertEquals(0.2d, widthProperty.getValue());
}
}