//
// Tests
//
////////////////////////////////////////////////////////////////////////////
public void test_parse() throws Exception {
PanelInfo panel =
parseJavaInfo(
"public class Test extends Panel {",
" public Test() {",
" setLayout(new ColumnLayout());",
" {",
" Label label = new Label();",
" add(label);",
" }",
" }",
"}");
assertInstanceOf(ColumnLayoutInfo.class, panel.getLayout());
//
assertHierarchy(
"{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);