"{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/ /add(label)/}",
" {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}",
" {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label)/}",
" {virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData} {virtual-layout-data} {}");
WidgetInfo label = panel.getChildrenWidgets().get(0);
RowLayoutDataInfo rowData = RowLayoutInfo.getRowData(label);
VirtualLayoutDataCreationSupport creationSupport =
(VirtualLayoutDataCreationSupport) rowData.getCreationSupport();
// access
assertNull(creationSupport.getNode());
assertEquals(
"virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData",
creationSupport.toString());
// validation
assertFalse(creationSupport.canReorder());
assertFalse(creationSupport.canReparent());
// no implicit clipboard
assertNull(creationSupport.getImplicitClipboard());
// delete, nothing changed
{
String expectedSource = m_lastEditor.getSource();
String expectedHierarchy = printHierarchy(panel);
assertTrue(creationSupport.canDelete());
rowData.delete();
assertEditor(expectedSource, m_lastEditor);
assertEquals(expectedHierarchy, printHierarchy(panel));
assertSame(rowData, RowLayoutInfo.getRowData(label));
}
}