Package org.jmule.core

Examples of org.jmule.core.JMRunnable


   
    final AdjustSpeedLimitsDialog _this = this;
    ok_button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent event) {
        dialog_action = DialogAction.OK;
        (new JMThread(new JMRunnable() {
          public void JMRun() {
            float d_limit = _this.getDownloadLimit();
            float u_limit = _this.getUploadLimit();
            try {
              if( _config_manager.getDownloadLimit() != d_limit )
View Full Code Here


      return ;
    }
   
    setWindowStatus(WindowStatus.CONNECTING);
   
    new JMThread(new JMRunnable() {
      public void JMRun() {
        SWTThread.getDisplay().asyncExec(new JMRunnable() {
          public void JMRun() {
            setWindowStatus(WindowStatus.CONNECTING);
          }});
        try {
          updater.checkForUpdates();
        }catch(JMUpdaterException e) {
          SWTThread.getDisplay().asyncExec(new JMRunnable() {
            public void JMRun() {
              Utils.showWarningMessage(shell, _._("updaterwindow.connect_failed_title"), _._("updaterwindow.connect_failed")+"\n"+updater.getErrorCode());
              setWindowStatus(WindowStatus.FAILED);
            }});
          return ;
        }
        SWTThread.getDisplay().asyncExec(new JMRunnable() {
          public void JMRun() {
            setWindowStatus(WindowStatus.CONNECTED);
          }});
      }
    }).start();
View Full Code Here

  private Shell shell;
  private Label currentTask;
  private ProgressBar progress_bar;
  private Label image;
  public SWTSplash() {
    SWTThread.getDisplay().syncExec(new JMRunnable() {
      public void JMRun() {
        shell = new Shell(SWTThread.getDisplay(),SWT.NULL);
        GridLayout layout = new GridLayout();
          layout.numColumns = 1;
          layout.horizontalSpacing = 0;
View Full Code Here

      }
    });
  }
 
  public void increaseProgress(final int value) {
    SWTThread.getDisplay().asyncExec(new JMRunnable() {
      public void JMRun() {
        progress_bar.setSelection(progress_bar.getSelection() + value);
      }
    });
  }
View Full Code Here

      }
    });
  }

  public void increaseProgress(final int value, final String message) {
    SWTThread.getDisplay().asyncExec(new JMRunnable() {
      public void JMRun() {
        progress_bar.setSelection(progress_bar.getSelection() + value);
        currentTask.setText(message);
      }
    });
View Full Code Here

      }
    });
  }

  public void resetProgress() {
    SWTThread.getDisplay().asyncExec(new JMRunnable() {
      public void JMRun() {
        progress_bar.setSelection(0);
        currentTask.setText("");
      }
    })
View Full Code Here

      }
    })
  }

  public void splashOff() {
    SWTThread.getDisplay().asyncExec(new JMRunnable() {
      public void JMRun() {
        shell.setVisible(false);
        image.getImage().dispose();
        shell.close();
        shell.dispose();
View Full Code Here

      }
    });
  }

  public void splashOn() {
    SWTThread.getDisplay().asyncExec(new JMRunnable() {
      public void JMRun() {
        shell.open()
      }
    });
  }
View Full Code Here

        Thread.sleep(SWTConstants.GUI_UPDATE_INTERVAL);
      } catch (InterruptedException e) {
        if (stop) return ;
      }
      if (!process_refreshables) {
        SWTThread.getDisplay().syncExec(new JMRunnable() {
        public void JMRun() {
          process_refreshables = true;
          for(Refreshable refreshable : refreshable_list) {
            try {
              refreshable.refresh();
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.