Examples of AzureusCoreRunningListener


Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

  // @see com.aelitis.azureus.ui.common.table.TableSelectionListener#defaultSelected(com.aelitis.azureus.ui.common.table.TableRowCore[])
  public void defaultSelected(TableRowCore[] rows, int stateMask) {
    final TRHostTorrent torrent = (TRHostTorrent) tv.getFirstSelectedDataSource();
    if (torrent == null)
      return;
    CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
   
      public void azureusCoreRunning(AzureusCore core) {
        DownloadManager dm = core.getGlobalManager().getDownloadManager(
            torrent.getTorrent());
        if (dm != null) {
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

    if (newCategory != null)
      assignSelectedToCategory(newCategory);
  }
 
  private void assignSelectedToCategory(final Category category) {
    CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
      public void azureusCoreRunning(final AzureusCore core) {
        assignSelectedToCategory(core, category);
      }
    });
  }
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener


  public void
  show()
  {
    CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
      public void azureusCoreRunning(AzureusCore core) {
        _show(core);
      }
    });
  }
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

    }
  }

  public static void runMLABTest(final boolean allowShaperProbeLogic,
      final Runnable runWhenClosed) {
    CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
      public void azureusCoreRunning(AzureusCore core) {
        UIFunctionsManager.getUIFunctions().installPlugin("mlab",
            "dlg.install.mlab", new UIFunctions.actionListener() {
              public void actionComplete(Object result) {
                if (result instanceof Boolean) {
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

  private Object ds;

  public MyTorrentsSuperView(Text txtFilter, Composite cCats) {
    this.txtFilter = txtFilter;
    this.cCats = cCats;
    AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
      public void azureusCoreRunning(AzureusCore core) {
        Utils.execSWTThread(new AERunnable() {
          public void runSupport() {
            TableColumnManager tcManager = TableColumnManager.getInstance();
            tcManager.addColumns(getCompleteColumns());
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

          form.layout();
        }
      }
    });

    AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
      public void azureusCoreRunning(final AzureusCore core) {
        Utils.execSWTThread(new AERunnable() {
          public void runSupport() {
            initializeWithCore(core, parent);
          }
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

  }

  // @see com.aelitis.azureus.ui.common.table.TableLifeCycleListener#tableViewInitialized()
  public void tableViewInitialized() {
    shell = tv.getComposite().getShell();
    AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
   
      public void azureusCoreRunning(AzureusCore core) {
        registerGlobalManagerListener(core);
      }
    });
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

      bTestTCP.setEnabled(false);
      bApply.setEnabled(false);
        textResults.setText("");

        CoreWaiterSWT.waitForCore(TriggerInThread.ANY_THREAD,
            new AzureusCoreRunningListener() {
              public void azureusCoreRunning(AzureusCore core) {
                CheckerTCP checker = new CheckerTCP(serverTCPListenPort);
                checker.start();
          }
        });
      }
    });
       
     
    bTestUDP.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
          bTestUDP.setEnabled(false);
          bTestTCP.setEnabled(false);
          bApply.setEnabled(false);
          textResults.setText("");

          CoreWaiterSWT.waitForCore(TriggerInThread.ANY_THREAD,
              new AzureusCoreRunningListener() {
                public void azureusCoreRunning(AzureusCore core) {
                  CheckerUDP checker = new CheckerUDP(core,serverUDPListenPort);
                  checker.start();
            }
          });
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

      Field fldOpenDoc = SWT.class.getDeclaredField("OpenDocument");
      int SWT_OpenDocument = fldOpenDoc.getInt(null);

      display.addListener(SWT_OpenDocument, new Listener() {
        public void handleEvent(final Event event) {
          AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
            public void azureusCoreRunning(AzureusCore core) {
              TorrentOpener.openTorrents(new String[] { event.text } );
            }
          });
        }
View Full Code Here

Examples of com.aelitis.azureus.core.AzureusCoreRunningListener

   
    paramMaxUploadSpeed.addChangeListener(new ParameterChangeAdapter() {
      ParameterChangeAdapter me = this;

      public void parameterChanged(Parameter p, boolean internal) {
        CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {

          public void azureusCoreRunning(AzureusCore core) {
            if (paramMaxUploadSpeed.isDisposed()) {
              paramMaxUploadSpeed.removeChangeListener(me);
              return;
            }

            // we don't want to police these limits when auto-speed is running as
            // they screw things up bigtime

            if (TransferSpeedValidator.isAutoSpeedActive(core.getGlobalManager())) {

              return;
            }

            int up_val = paramMaxUploadSpeed.getValue();
            int down_val = paramMaxDownSpeed.getValue();

            if (up_val != 0
                && up_val < COConfigurationManager.CONFIG_DEFAULT_MIN_MAX_UPLOAD_SPEED) {

              if ((down_val == 0) || down_val > (up_val * 2)) {

                paramMaxDownSpeed.setValue(up_val * 2);
              }
            } else {

              if (down_val != manual_max_download_speed[0]) {

                paramMaxDownSpeed.setValue(manual_max_download_speed[0]);
              }
            }
          }

        });
      };
    });

    paramMaxDownSpeed.addChangeListener(new ParameterChangeAdapter() {
      ParameterChangeAdapter me = this;

      public void parameterChanged(Parameter p, boolean internal) {
        CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {

          public void azureusCoreRunning(AzureusCore core) {
            if (paramMaxDownSpeed.isDisposed()) {
              paramMaxDownSpeed.removeChangeListener(me);
              return;
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.