//
// Tests
//
////////////////////////////////////////////////////////////////////////////
public void test_parse() throws Exception {
PanelInfo panel =
parseJavaInfo(
"public class Test extends Panel {",
" public Test() {",
" setLayout(new RowLayout());",
" {",
" Toolbar toolbar = new Toolbar();",
" toolbar.setAutoHeight(true);",
" toolbar.addButton(new ToolbarButton('A'));",
" toolbar.addButton(new ToolbarMenuButton('B'));",
" toolbar.addItem(new ToolbarTextItem('C'));",
" toolbar.addField(new TextField('D'));",
" add(toolbar);",
" }",
" }",
"}");
panel.refresh();
//
assertHierarchy(
"{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/ /add(toolbar)/}",
" {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}",
" {new: com.gwtext.client.widgets.Toolbar} {local-unique: toolbar} {/new Toolbar()/ /toolbar.setAutoHeight(true)/ /toolbar.addButton(new ToolbarButton('A'))/ /toolbar.addButton(new ToolbarMenuButton('B'))/ /toolbar.addItem(new ToolbarTextItem('C'))/ /toolbar.addField(new TextField('D'))/ /add(toolbar)/}",
" {new: com.gwtext.client.widgets.ToolbarButton} {empty} {/toolbar.addButton(new ToolbarButton('A'))/}",
" {new: com.gwtext.client.widgets.ToolbarMenuButton} {empty} {/toolbar.addButton(new ToolbarMenuButton('B'))/}",
" {new: com.gwtext.client.widgets.ToolbarTextItem} {empty} {/toolbar.addItem(new ToolbarTextItem('C'))/}",
" {new: com.gwtext.client.widgets.form.TextField} {empty} {/toolbar.addField(new TextField('D'))/}",
" {virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData} {virtual-layout-data} {}");
//
ToolbarInfo toolbar = (ToolbarInfo) panel.getChildrenWidgets().get(0);
assertFalse(toolbar.shouldDrawDotsBorder());
}