" {implicit-layout: default} {implicit-layout} {}",
" {new: com.extjs.gxt.ui.client.widget.menu.Menu} {local-unique: menu} {/new Menu()/ /add(menu)/ /menu.add(item)/}",
" {new: com.extjs.gxt.ui.client.widget.menu.MenuItem} {local-unique: item} {/new MenuItem()/ /menu.add(item)/ /item.setSubMenu(subMenu)/}",
" {new: com.extjs.gxt.ui.client.widget.menu.Menu} {local-unique: subMenu} {/new Menu()/ /item.setSubMenu(subMenu)/}");
container.refresh();
MenuInfo menu = (MenuInfo) container.getWidgets().get(0);
MenuItemInfo item = (MenuItemInfo) menu.getItems().get(0);
// prepare "subMenu"
MenuInfo subMenu = item.getSubMenu();
assertNotNull(subMenu);
// prepare object for "subMenu"
IMenuInfo subMenuObject;
{
IMenuInfo menuObject = MenuObjectInfoUtils.getMenuInfo(menu);
IMenuItemInfo itemObject = menuObject.getItems().get(0);
subMenuObject = itemObject.getMenu();
}
// check
assertNotNull(subMenuObject);
assertSame(subMenu, subMenuObject.getModel());
{
Image image = subMenu.getImage();
assertNotNull(image);
}
{
Rectangle bounds = subMenu.getBounds();
assertEquals(120, bounds.width);
assertEquals(30, bounds.height);
}
}