Package org.jmule.core

Examples of org.jmule.core.JMRunnable


   
    shell.open();
  }
 
  private void importServerList() {
    SWTThread.getDisplay().asyncExec(new JMRunnable() {
      public void JMRun() {
        setWindowStatus(false);
        try {
          server_manager.importList(file_path.getText());
        } catch (ServerManagerException e) {
View Full Code Here


         });
         paste_ed2k_links = new JMenuItem("Paste ed2k link(s)");
         paste_ed2k_links.setIcon(ImgRep.getIcon("ed2k_link_paste.png"));
         paste_ed2k_links.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent event) {
                  (new JMThread(new JMRunnable() {
                     public void JMRun() {
                     try
                       Object clipboard_contents = clipboard.getData(DataFlavor.stringFlavor);
                       List<ED2KFileLink> clipboard_file_links = ED2KFileLink.extractLinks(clipboard_contents.toString());
                     if( clipboard_file_links.size() != 0
View Full Code Here

    CONNECT_TO
  }
 
  private void executeSelectedServersOp(ServersOp operation) {
    final ServersOp foperation = operation; 
    (new JMThread(new JMRunnable() {
    public void JMRun() {
      if(foperation == ServersOp.REMOVE_ALL_FROM_LIST) {
        _server_manager.clearServerList();
        return;
      }
View Full Code Here

          final Peer peer = PeerManagerSingleton.getInstance()
              .newPeer(buddy.getAddress().toString(),
                  buddy.getTCPPort(), PeerSource.KAD);
          Logger.getSingleton().logMessage(
              "KAD callback request, Peer : " + peer);
          JMRunnable task = new JMRunnable() {
            public void JMRun() {
              try {
                _network_manager.addPeer(peer.getIP(), peer
                    .getPort());
              } catch (NetworkManagerException e1) {
View Full Code Here

     
       public void actionPerformed(ActionEvent event) {
       
        _this.setVisible(false);
         
         (new JMThread( new JMRunnable() {  
       
        public void JMRun() {  
        
          ConfigurationManager _config = _core.getConfigurationManager();
          GeneralSettings gs = null;
View Full Code Here

         });
         paste_ed2k_links = new JMenuItem("Paste ed2k link(s)");
         paste_ed2k_links.setIcon(ImgRep.getIcon("ed2k_link_paste.png"));
         paste_ed2k_links.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent event) {
                  (new JMThread(new JMRunnable() {
                     public void JMRun() {
                     try
                       Object clipboard_contents = clipboard.getData(DataFlavor.stringFlavor);
                       List<ED2KFileLink> clipboard_file_links = ED2KFileLink.extractLinks(clipboard_contents.toString());
                     if( clipboard_file_links.size() != 0
View Full Code Here

    } catch (ConfigurationManagerException e) {
      e.printStackTrace();
    }
    _core.getConfigurationManager().addConfigurationListener(new ConfigurationAdapter() {
      public void nickNameChanged(String nickName) {
        SWTThread.getDisplay().asyncExec(new JMRunnable() {
          public void JMRun() {
            try {
              my_info_nickname.setText(_core.getConfigurationManager().getNickName());
            } catch (ConfigurationManagerException e) {
              e.printStackTrace();
View Full Code Here

      public void widgetSelected(final SelectionEvent e) {
        showColumnEditorWindow();
      }
    });
   
    new JMThread(new JMRunnable() {
      Server x;
      public void JMRun() {
        for(Server server : server_manager.getServers()) {
          x = server;
          SWTThread.getDisplay().syncExec(new JMRunnable() {
            public void JMRun() {
              addServer(x);
            }});
        }
        }
View Full Code Here

    return 0;
  }

  private void addToStaticList() {
    final List<Server> list = getSelectedObjects();
    new JMThread(new JMRunnable() {
      public void JMRun() {
        for(Server server : list)
          server.setStatic(true);
        try {
          servers_manager.storeServerList();
        } catch (ServerManagerException e1) {
          SWTThread.getDisplay().asyncExec(new JMRunnable() {
            public void JMRun() {
              Utils.showWarningMessage(getShell(), Localizer._("mainwindow.serverlisttab.serverlist.server_list_store_error_title"),
                  Localizer._("mainwindow.serverlisttab.serverlist.server_list_store_error"));
              MainWindow.getLogger().error(Localizer._("mainwindow.logtab.error_serverlist_save_failed"));
            }
View Full Code Here

        }}}).start();
  }
 
  private void removeFromStaticList() {
    final List<Server> list = getSelectedObjects();
    new JMThread(new JMRunnable() {
      public void JMRun() {
       
        for(Server server : list)
          server.setStatic(false);
        try {
          servers_manager.storeServerList();
        } catch (ServerManagerException e1) {
          SWTThread.getDisplay().asyncExec(new JMRunnable() {
            public void JMRun() {
              Utils.showWarningMessage(getShell(), Localizer._("mainwindow.serverlisttab.serverlist.server_list_store_error_title"),
                  Localizer._("mainwindow.serverlisttab.serverlist.server_list_store_error"));
              MainWindow.getLogger().error(Localizer._("mainwindow.logtab.error_serverlist_save_failed"));
            }
View Full Code Here

TOP

Related Classes of org.jmule.core.JMRunnable

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.