MenuItem addChildSeq = new MenuItem();
addChildSeq.setTitle("Sequance");
addChildSeq
.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
public void onClick(MenuItemClickEvent event) {
TreeNode node = newChild(Sequence);
node.setAttribute(Type, Sequence);
node.setAttribute(Min, 1);
node.setAttribute(Max, 1);
}
});
mainMenu.addItem(addChildSeq);
MenuItem addChildChoce = new MenuItem();
addChildChoce.setTitle("Choice");
addChildChoce
.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
public void onClick(MenuItemClickEvent event) {
TreeNode node = newChild(Choice);
node.setAttribute("Type", Choice);
node.setAttribute("Min", 1);
node.setAttribute("Max", 1);
}
});
mainMenu.addItem(addChildChoce);
MenuItem addChildSimple = new MenuItem();
addChildSimple.setTitle("Simple");
addChildSimple
.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
public void onClick(MenuItemClickEvent event) {
TreeNode node = newChild(Simple);
node.setAttribute(Type, Simple);
node.setAttribute(Min, 1);
node.setAttribute(Max, 1);
}
});
mainMenu.addItem(addChildSimple);
return mainMenu;