" {implicit-layout: default} {implicit-layout} {}",
" {new: com.extjs.gxt.ui.client.widget.button.Button} {local-unique: button} {/new Button()/ /add(button)/ /button.setMenu(menu)/}",
" {new: com.extjs.gxt.ui.client.widget.menu.Menu} {local-unique: menu} {/new Menu()/ /button.setMenu(menu)/}");
container.refresh();
ComponentInfo button = (ComponentInfo) container.getWidgets().get(0);
MenuInfo menu = button.getChildren(MenuInfo.class).get(0);
assertFalse(menu.isSubMenu());
// IMenuPopupInfo
IMenuPopupInfo popupObject = MenuObjectInfoUtils.getMenuPopupInfo(menu);
assertSame(menu, popupObject.getModel());
// presentation
{
// use icon as "popup" image
{
Image image = popupObject.getImage();
assertSame(menu.getDescription().getIcon(), image);
}
// some reasonable bounds
{
Rectangle bounds = popupObject.getBounds();
assertThat(bounds.width).isEqualTo(16);