Package org.eclipse.swt.widgets

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


   
    final MenuItem copy_item = new MenuItem(popup_menu,SWT.PUSH);
    copy_item.setText(_._("mainwindow.logtab.popupmenu.copy"));
    copy_item.setImage(SWTImageRepository.getImage("copy.png"));
   
    copy_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        Utils.setClipBoardText(log_content.getSelectionText());
      }
    });
   
View Full Code Here


    });
   
    final MenuItem save_item = new MenuItem(popup_menu,SWT.PUSH);
    save_item.setText(_._("mainwindow.logtab.popupmenu.save"));
    save_item.setImage(SWTImageRepository.getImage("save.png"));
    save_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        FileDialog dialog = new FileDialog (getShell(), SWT.SAVE);
        dialog.setFilterNames (new String [] {"All Files (*.*)"});
        dialog.setFilterExtensions (new String [] {"*.*"});
        dialog.open();
 
View Full Code Here

      }
    });
   
    final MenuItem select_all_item = new MenuItem(popup_menu,SWT.PUSH);
    select_all_item.setText(_._("mainwindow.logtab.popupmenu.select_all"));
    select_all_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        log_content.selectAll();
      }
    });
   
View Full Code Here

    new MenuItem(popup_menu,SWT.SEPARATOR);
   
    final MenuItem clear_item = new MenuItem(popup_menu,SWT.PUSH);
    clear_item.setText(_._("mainwindow.logtab.popupmenu.clear"));
    clear_item.setImage(SWTImageRepository.getImage("remove_all.png"));
    clear_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        log_content.setText("");
      }
    });
   
View Full Code Here

   
    MenuItem new_server_item = new MenuItem(new_submenu,SWT.PUSH);
    new_server_item.setText(_._("mainwindow.mainmenu.file.new.new_server"));
    new_server_item.setImage(SWTImageRepository.getMenuImage("server_add.png"));
   
    new_server_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        new NewWindow(NewWindow.WindowType.SERVER);     
      }
    });
   
View Full Code Here

    });
   
    MenuItem new_download_item = new MenuItem(new_submenu,SWT.PUSH);
    new_download_item.setText(_._("mainwindow.mainmenu.file.new.new_download"));
    new_download_item.setImage(SWTImageRepository.getMenuImage("folder_down.png"));
    new_download_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        new NewWindow(NewWindow.WindowType.DOWNLOAD);     
      }
    });
   
View Full Code Here

    });
   
    MenuItem new_shared_folder_item = new MenuItem(new_submenu,SWT.PUSH);
    new_shared_folder_item.setText(_._("mainwindow.mainmenu.file.new.new_shared_dir"));
    new_shared_folder_item.setImage(SWTImageRepository.getMenuImage("share_folder.png"));
    new_shared_folder_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        new NewWindow(NewWindow.WindowType.SHARED_DIR);     
      }
    });
   
View Full Code Here

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

    new MenuItem (submenu, SWT.SEPARATOR);

    MenuItem exit_item = new MenuItem (submenu, SWT.PUSH);
    exit_item.setText(Localizer._("mainwindow.mainmenu.file.exit"));
    exit_item.setImage(SWTImageRepository.getMenuImage("door_in.png"));
    exit_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        main_window.close();
      }
     
    });
View Full Code Here

   
    MenuItem servers_item = new MenuItem (tabs_menu, SWT.RADIO);
    servers_item.setText(Localizer._("mainwindow.mainmenu.view.tabs.servers"));
    tab_map.put(JMULE_TABS.SERVERLIST,servers_item);
   
    servers_item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent arg0) {
        main_window.setTab(JMULE_TABS.SERVERLIST);
      }
    });
   
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.