" {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /inner.add(label)/}",
" {virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData} {virtual-layout-data} {}");
}
public void test_LayoutDataMng_deleteLayoutData_whenMoveWidgetFrom() throws Exception {
PanelInfo panel =
parseJavaInfo(
"public class Test extends Panel {",
" public Test() {",
" setLayout(new RowLayout());",
" {",
" Panel inner = new Panel();",
" add(inner);",
" }",
" {",
" Label label = new Label();",
" add(label, new RowLayoutData(50));",
" }",
" }",
"}");
panel.refresh();
// initial state
assertHierarchy(
"{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/ /add(inner)/ /add(label, new RowLayoutData(50))/}",
" {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}",
" {new: com.gwtext.client.widgets.Panel} {local-unique: inner} {/new Panel()/ /add(inner)/}",
" {implicit-layout: default} {implicit-layout} {}",
" {virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData} {virtual-layout-data} {}",
" {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label, new RowLayoutData(50))/}",
" {new: com.gwtext.client.widgets.layout.RowLayoutData} {empty} {/add(label, new RowLayoutData(50))/}");
PanelInfo inner = (PanelInfo) panel.getChildrenWidgets().get(0);
WidgetInfo label = panel.getChildrenWidgets().get(1);
// move "label" to "inner"
inner.getLayout().command_MOVE(label, null);
assertEditor(
"public class Test extends Panel {",
" public Test() {",
" setLayout(new RowLayout());",
" {",