Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.MenuItem.addSelectionListener()


   
    MenuItem options_item = new MenuItem (submenu, SWT.PUSH);
    options_item.setImage(SWTImageRepository.getMenuImage("cog_edit.png"));
    options_item.setText(Localizer._("mainwindow.mainmenu.tools.options"));
   
    options_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        SettingsWindow window = new SettingsWindow();
        window.getCoreComponents();
        window.initUIComponents();
      }
View Full Code Here


    helpItem.setMenu (submenu);
   
    MenuItem open_support_item = new MenuItem (submenu, SWT.PUSH);
    open_support_item.setText(Localizer._("mainwindow.mainmenu.help.open_support"));
    open_support_item.setImage(SWTImageRepository.getMenuImage("world_link.png"));
    open_support_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        SWTThread.getDisplay().asyncExec(new JMRunnable() {
          public void JMRun() {
            Program.launch(JMConstants.OPEN_SUPPORT);
          }
View Full Code Here

    });
   
    MenuItem bugtracker_item = new MenuItem (submenu, SWT.PUSH);
    bugtracker_item.setText(Localizer._("mainwindow.mainmenu.help.bug_tracker"));
    bugtracker_item.setImage(SWTImageRepository.getMenuImage("world_link.png"));
    bugtracker_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        SWTThread.getDisplay().asyncExec(new JMRunnable() {
          public void JMRun() {
            Program.launch(JMConstants.JMULE_BUG_TRACKER);
          }
View Full Code Here

    });*/
   
    MenuItem forum_item = new MenuItem (submenu, SWT.PUSH);
    forum_item.setText(Localizer._("mainwindow.mainmenu.help.forum"));
    forum_item.setImage(SWTImageRepository.getMenuImage("world_link.png"));
    forum_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        SWTThread.getDisplay().asyncExec(new JMRunnable() {
          public void JMRun() {
            Program.launch(JMConstants.JMULE_FORUMS);
          }
View Full Code Here

    new MenuItem (submenu, SWT.SEPARATOR);
   
    MenuItem update_check_item = new MenuItem (submenu, SWT.PUSH);
    update_check_item.setText(Localizer._("mainwindow.mainmenu.help.updatecheck"));
    update_check_item.setImage(SWTImageRepository.getMenuImage("updater.png"));
    update_check_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        UpdaterWindow window = new UpdaterWindow();
        window.getCoreComponents();
        window.initUIComponents();
      }
View Full Code Here

    new MenuItem (submenu, SWT.SEPARATOR);
   
    MenuItem about_item = new MenuItem (submenu, SWT.PUSH);
    about_item.setText(Localizer._("mainwindow.mainmenu.help.about"));
    about_item.setImage(SWTImageRepository.getMenuImage("information.png"));
    about_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        AboutWindow window = new AboutWindow();
        window.getCoreComponents();
        window.initUIComponents();
      }
View Full Code Here

     
      popup_menu = new Menu(this);
      MenuItem paste_ed2k = new MenuItem(popup_menu,SWT.PUSH);
      paste_ed2k.setText(_._("newwindow.menu.paste_ed2k_link"));
      paste_ed2k.setImage(SWTImageRepository.getImage("ed2k_link_paste.png"));
      paste_ed2k.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
          paste();
        }
      });
    }
View Full Code Here

     
      popup_menu = new Menu(this);
      MenuItem paste_ed2k = new MenuItem(popup_menu,SWT.PUSH);
      paste_ed2k.setText(_._("newwindow.menu.paste_ed2k_link"));
      paste_ed2k.setImage(SWTImageRepository.getImage("ed2k_link_paste.png"));
      paste_ed2k.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
          paste();
        }
      })
    }
View Full Code Here

    Menu popup_menu = new Menu(this);
   
    final MenuItem copy_selected = new MenuItem(popup_menu,SWT.PUSH);
    copy_selected.setText(_._("mainwindow.serverlisttab.servermesasges.popupmenu.copy"));
    copy_selected.setImage(SWTImageRepository.getImage("copy.png"));
    copy_selected.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        String text = getSelectionText();
        if (text.length()!=0)
          Utils.setClipBoardText(text);
      }
View Full Code Here

      }
    });
   
    final MenuItem select_all = new MenuItem(popup_menu,SWT.PUSH);
    select_all.setText(_._("mainwindow.serverlisttab.servermesasges.popupmenu.select_all"));
    select_all.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        selectAll();
      }
    });
   
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.