Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Menu.addMenuListener()


  private void refactorMenuShown(final IMenuManager refactorSubmenu) {
    // we know that we have an MenuManager since we created it in
    // addRefactorSubmenu.
    Menu menu = ((MenuManager) refactorSubmenu).getMenu();
    menu.addMenuListener(new MenuAdapter() {
      public void menuHidden(MenuEvent e) {
        refactorMenuHidden(refactorSubmenu);
      }
    });
    ITextSelection textSelection = (ITextSelection) fEditor
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.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

    switches_table = new Table(composite_1, SWT.BORDER | SWT.FULL_SELECTION);
    switches_table.setHeaderVisible(true);
    switches_table.setLinesVisible(true);
    final Menu switchMenu = new Menu(switches_table);
    switches_table.setMenu(switchMenu);
    switchMenu.addMenuListener(new MenuAdapter() {
      public void menuShown(MenuEvent e) {
        // Get rid of existing menu items
        MenuItem[] items = switchMenu.getItems();
        for (int i = 0; i < items.length; i++) {
          ((MenuItem) items[i]).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

                    });


                    peer_remove.setMenu(popupmenu_table);

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


                        }
View Full Code Here

    Rectangle bounds = toolBar.getBounds();
    Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
    topLeft = dialogShell.toDisplay(topLeft);
    aMenu.setLocation(topLeft.x, topLeft.y);
    aMenu.addMenuListener(new MenuListener() {

      public void menuHidden(MenuEvent e) {
        isDeactivateListenerActive = true;
      }
View Full Code Here

    Rectangle bounds = toolBar.getBounds();
    Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
    topLeft = dialogShell.toDisplay(topLeft);
    aMenu.setLocation(topLeft.x, topLeft.y);
    aMenu.addMenuListener(new MenuListener() {

      public void menuHidden(MenuEvent e) {
        isDeactivateListenerActive = true;
      }
View Full Code Here

    Rectangle bounds = toolBar.getBounds();
    Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
    topLeft = dialogShell.toDisplay(topLeft);
    aMenu.setLocation(topLeft.x, topLeft.y);
    aMenu.addMenuListener(new MenuListener() {

      public void menuHidden(MenuEvent e) {
        isDeactivateListenerActive = true;
      }
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.