Package org.zkoss.zul

Examples of org.zkoss.zul.Menuitem.addEventListener()


    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);
View Full Code Here


        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);
View Full Code Here

        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);
View Full Code Here

        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);
View Full Code Here

            }
        });
        for (final Item item : items) {
            if (!item.name.equals("separator")) {
                Menuitem menuItem = item.createMenuItem();
                menuItem.addEventListener("onClick", new EventListener() {
                    @Override
                    public void onEvent(Event event) {
                        ItemAction<T> action = item.action;
                        action.onEvent(referenced, event);
                    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.