Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.MenuListener


          copy();
        }
      }
    };
    copyItem.addSelectionListener(listener);
    menu.addMenuListener(new MenuListener() {
      public void menuShown(MenuEvent e) {
        copyItem.setEnabled(canCopy());
      }

      public void menuHidden(MenuEvent e) {
View Full Code Here


          copy();
        }
      }
    };
    copyItem.addSelectionListener(listener);
    menu.addMenuListener(new MenuListener() {
      public void menuShown(MenuEvent e) {
        copyItem.setEnabled(canCopy());
      }

      public void menuHidden(MenuEvent e) {
View Full Code Here

   
        // Set the menu to the table
        listTable.setMenu( popupmenu_table);
       
        //new listener to gray out appropriate items unless certain criteria are met
        popupmenu_table.addMenuListener(new MenuListener(){
            public void menuHidden(MenuEvent arg0) {
               
               
            }
View Full Code Here

       
    mainStatus.setMenu(popupmenu_status);   
       
       
       
        popupmenu_status.addMenuListener(new MenuListener(){
            public void menuHidden(MenuEvent arg0) {
               
               
            }
View Full Code Here

                    copy();
                }
            }
        };
        copyItem.addSelectionListener(listener);
        menu.addMenuListener(new MenuListener() {
            public void menuShown(MenuEvent e) {
                copyItem.setEnabled(canCopy());
            }

            public void menuHidden(MenuEvent e) {
View Full Code Here

      }
    };

    Menu systemMenu = display.getSystemMenu();
    if (systemMenu != null) {
      systemMenu.addMenuListener(new MenuListener() {
        @Override
        public void menuHidden(MenuEvent e) {
          System.out.println("App menu closed");
        }
View Full Code Here

    buttonContainer.setLayout(LayoutUtils.createGridLayout(1, 0, 0));
    buttonContainer.setLayoutData(new GridData(SWT.BEGINNING, SWT.FILL, false, false));

    /* Add */
    fAddMenu = new Menu(getShell(), SWT.POP_UP);
    fAddMenu.addMenuListener(new MenuListener() {
      public void menuShown(MenuEvent e) {
        MenuItem[] items = fAddMenu.getItems();
        for (MenuItem item : items) {
          item.dispose();
        }
View Full Code Here

    buttonContainer.setLayout(LayoutUtils.createGridLayout(1, 0, 0));
    buttonContainer.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));

    /* Add */
    final Menu menu = new Menu(getShell(), SWT.POP_UP);
    menu.addMenuListener(new MenuListener() {
      public void menuShown(MenuEvent e) {
        MenuItem[] items = menu.getItems();
        for (MenuItem item : items) {
          item.dispose();
        }
View Full Code Here

        delete.addListener(SWT.Selection, delete_listener);

        clientTable.setMenu(popupmenu_table);


        popupmenu_table.addMenuListener(new MenuListener(){
            public void menuHidden(MenuEvent arg0) {


            }
View Full Code Here

                    });


                    table1.setMenu(popupmenu_table);

                    popupmenu_table.addMenuListener(new MenuListener(){
                        public void menuHidden(MenuEvent arg0) {


                        }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.MenuListener

Copyright © 2018 www.massapicom. 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.