Menubar menubar=(Menubar)getFellow("menubar");
Menu actionsMenu=new Menu("Actions");
menubar.appendChild(actionsMenu);
Menupopup popup=new Menupopup();
actionsMenu.appendChild(popup);
Menuitem createItem =new Menuitem("Create");
createItem.addEventListener("onClick", new EventListener(){
public void onEvent(Event event) throws Exception {
Map<String, ArrayList<String>> map=new HashMap<String, ArrayList<String>>();
ArrayList<String> options=new ArrayList<String>();
options.add("create");
map.put("options", options);
openDetails(map);
}
});
Menuitem showItem =new Menuitem("Show");
showItem.addEventListener("onClick", new EventListener(){
public void onEvent(Event event) throws Exception {
Map<String, ArrayList<String>> map=new HashMap<String, ArrayList<String>>();
ArrayList<String> options=new ArrayList<String>();
options.add("show");
map.put("options", options);
openDetails(map);
}
});
Menuitem editItem=new Menuitem("Edit");
editItem.addEventListener("onClick", new EventListener(){
public void onEvent(Event event) throws Exception {
Map<String, ArrayList<String>> map=new HashMap<String, ArrayList<String>>();
ArrayList<String> options=new ArrayList<String>();
options.add("edit");
map.put("options", options);
openDetails(map);
}
});
Menuitem deleteItem=new Menuitem("Delete");
deleteItem.addEventListener("onClick", new EventListener(){
public void onEvent(Event event) throws Exception {
Map<String, ArrayList<String>> map=new HashMap<String, ArrayList<String>>();
ArrayList<String> options=new ArrayList<String>();
options.add("delete");
map.put("options", options);