Package org.eclipse.swt.widgets

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


      public void widgetSelected(SelectionEvent e) {
        aboutDialog.open();
      }
    });

    MenuItem fetchers = new MenuItem(systemMenu, SWT.NONE, systemMenu.indexOf(prefs) + 1);
    fetchers.setText(Labels.getLabel("menu.tools.fetchers"));
    fetchers.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        selectFetchersDialog.open();
View Full Code Here


      public void widgetSelected(SelectionEvent e) {
        selectFetchersDialog.open();
      }
    });

    MenuItem checkVersion = new MenuItem(systemMenu, SWT.NONE, systemMenu.indexOf(about) + 1);
    checkVersion.setText(Labels.getLabel("menu.help.checkVersion"));
    checkVersion.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        checkVersionListener.check();
View Full Code Here

        public void widgetSelected(SelectionEvent e) {
          System.out.println("About selected");
        };
      });

      int prefsIndex = systemMenu.indexOf(getItem(systemMenu, SWT.ID_PREFERENCES));
      MenuItem newAppMenuItem = new MenuItem(systemMenu, SWT.CASCADE, prefsIndex + 1);
      newAppMenuItem.setText("SWT-added item");
      newAppMenuItem.setAccelerator(SWT.MOD1 | 'i');
      newAppMenuItem.addArmListener(armListener);
      newAppMenuItem.addSelectionListener(new SelectionAdapter() {
View Full Code Here

        if ("Mac OS X".equals(System.getProperty("os.name"))) //$NON-NLS-1$ //$NON-NLS-2$
        {
            Menu systemMenu = Display.getDefault().getSystemMenu();
            if (systemMenu != null)
            {
                int prefsIndex = systemMenu.indexOf(getItem(systemMenu, SWT.ID_PREFERENCES));

                MenuItem updatesMenuItem = new MenuItem(systemMenu, SWT.CASCADE, prefsIndex + 1);
                updatesMenuItem.setText(Messages.SystemMenuCheckForUpdates);
                updatesMenuItem.addSelectionListener(new SelectionAdapter()
                {
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.