" }",
"}");
}
public void test_menu_ADD() throws Exception {
CanvasInfo canvas =
parseJavaInfo(new String[]{
"public class Test implements EntryPoint {",
" public void onModuleLoad() {",
" Canvas canvas = new Canvas();",
" MenuBar menuBar = new MenuBar();",
" {",
" Menu menu = new Menu();",
" MenuItem menuItem = new MenuItem('New MenuItem');",
" menu.addItem(menuItem);",
" menuBar.setMenus(new Menu[] { new Menu(), menu });",
" }",
" canvas.addChild(menuBar);",
" canvas.draw();",
" }",
"}"});
canvas.refresh();
MenuBarInfo menuBar = canvas.getChildren(MenuBarInfo.class).get(0);
//
MenuBarInfo newMenuBar = createJavaInfo("com.smartgwt.client.widgets.menu.MenuBar");
canvas.command_absolute_CREATE(newMenuBar, null);
//
MenuInfo menu = menuBar.getMenus().get(1);
newMenuBar.command_MOVE(menu, null);
assertEditor(
"public class Test implements EntryPoint {",