Package org.gudy.azureus2.core3.util

Examples of org.gudy.azureus2.core3.util.AEThread


    }
   
    final trustDialog[]  dialog = new trustDialog[1];
   
    try{
      Utils.execSWTThread(new AERunnable() {
            public void
            runSupport()
            {
              dialog[0] = new trustDialog( display, resource, cert );
            }
View Full Code Here


      return;
    }
   
    try{
      display.asyncExec(
          new AERunnable()
          {
            public void
            runSupport()
            {
               new createDialog( display );
View Full Code Here

    if (logAlert.details != null) {
      text += "\n<A HREF=\"details\">" + MessageText.getString("v3.MainWindow.button.viewdetails") + "</A>";
    }

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        openWindow();
      }
    });
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.ui.IStartup#earlyStartup()
   */
  public void earlyStartup() {
    final Display display = Display.getDefault();
    display.syncExec(new AERunnable() {
      public void runSupport() {
        hookApplicationMenu(display);
      }
    });
  }
View Full Code Here

        InsertMenuItemTextWithCFString(menu, 0, (short) 8,
            kMenuItemAttrSeparator, 0);
      }

      // schedule disposal of callback object
      display.disposeExec(new AERunnable() {
        public void runSupport() {
          try {
            mCallback_dispose.invoke(commandCallback, new Object[] {});
          } catch (Throwable e) {
          }
View Full Code Here

    if (!(widget instanceof Shell)) {
      return eventNotHandledErr;
    }
    final Shell shellAffected = (Shell) widget;

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        int type;
        Long l = (Long) shellAffected.getData("OSX.ToolBarToggle");
        if (l == null || l.longValue() == 0) {
          type = SWT.Collapse;
View Full Code Here

  // @see org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloaderListener#completed(org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader, java.io.InputStream)
  public boolean completed(ResourceDownloader downloader, InputStream data) {
    downloader.removeListener(this);
    if (!nextUpdate()) {
      // fire in another thread so completed function can exit
      AEThread thread = new AEThread("AllDownloadsComplete", true) {
        public void runSupport() {
          allDownloadsComplete();
        }
      };
      thread.start();
    }
    return true;
  }
View Full Code Here

          if (path != null) {

            d_pathParameter.setValue(path);

            new AEThread("SoundTest") {
              public void runSupport() {
                try {
                  Applet.newAudioClip(new File(path).toURL()).play();

                  Thread.sleep(2500);

                } catch (Throwable e) {

                }
              }
            }.start();
          }
        }
      });

      Label d_sound_info = new Label(cArea, SWT.WRAP);
      Messages.setLanguageText(d_sound_info, INTERFACE_PREFIX
          + "wavlocation.info");
      gridData = new GridData(GridData.FILL_HORIZONTAL);
      gridData.widthHint = 100;
      d_sound_info.setLayoutData(gridData);

      d_play_sound.setAdditionalActionPerformer(new ChangeSelectionActionPerformer(
          d_pathParameter.getControls()));
      d_play_sound.setAdditionalActionPerformer(new ChangeSelectionActionPerformer(
          new Control[] {
            d_browse,
            d_sound_info
          }));

      //
    }

    BooleanParameter f_play_sound = new BooleanParameter(cArea,
        "Play File Finished", LBLKEY_PREFIX + "playfilefinished");

    // OS X counterpart for alerts (see below for what is disabled)

    if (Constants.isOSX) {

      // per-file info

      gridData = new GridData();
      gridData.horizontalSpan = 3;
      gridData.widthHint = 0;
      gridData.heightHint = 0;
      Composite f_filler = new Composite(cArea, SWT.NONE);
      f_filler.setSize(0, 0);
      f_filler.setLayoutData(gridData);

      final BooleanParameter f_speechEnabledParameter = new BooleanParameter(
          cArea, "Play File Finished Announcement", LBLKEY_PREFIX
              + "playfilespeech");

      final StringParameter f_speechParameter = new StringParameter(cArea,
          "Play File Finished Announcement Text");
      gridData = new GridData();
      gridData.horizontalSpan = 3;
      gridData.widthHint = 150;
      f_speechParameter.setLayoutData(gridData);
      ((Text) f_speechParameter.getControl()).setTextLimit(40);

      f_speechEnabledParameter.setAdditionalActionPerformer(new ChangeSelectionActionPerformer(
          f_speechParameter.getControls()));

      final Label speechInfo = new Label(cArea, SWT.NONE);
      gridData = new GridData();
      gridData.horizontalSpan = 4;
      gridData.horizontalIndent = 24;
      speechInfo.setLayoutData(gridData);

      Messages.setLanguageText(speechInfo, LBLKEY_PREFIX
          + "playfilespeech.info");
    }

    //Option disabled on OS X, as impossible to make it work correctly
    if (!Constants.isOSX) {

      // file info

      gridData = new GridData(GridData.FILL_HORIZONTAL);

      final StringParameter f_pathParameter = new StringParameter(cArea,
          "Play File Finished File", "");

      if (f_pathParameter.getValue().length() == 0) {

        f_pathParameter.setValue("<default>");
      }

      f_pathParameter.setLayoutData(gridData);

      Button f_browse = new Button(cArea, SWT.PUSH);

      f_browse.setImage(imgOpenFolder);

      imgOpenFolder.setBackground(f_browse.getBackground());

      f_browse.setToolTipText(MessageText.getString("ConfigView.button.browse"));

      f_browse.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
          FileDialog dialog = new FileDialog(parent.getShell(),
              SWT.APPLICATION_MODAL);
          dialog.setFilterExtensions(new String[] { "*.wav"
          });
          dialog.setFilterNames(new String[] { "*.wav"
          });

          dialog.setText(MessageText.getString(INTERFACE_PREFIX + "wavlocation"));

          final String path = dialog.open();

          if (path != null) {

            f_pathParameter.setValue(path);

            new AEThread("SoundTest") {
              public void runSupport() {
                try {
                  Applet.newAudioClip(new File(path).toURL()).play();

                  Thread.sleep(2500);
View Full Code Here

       
        final int test_mode = NetworkAdminSpeedTester.TEST_TYPES[testCombo.getSelectionIndex()];
        final boolean encState = encryptToggle.getSelection();

        Thread t =
      new AEThread("SpeedTest Performer")
      {
        public void
        runSupport()
        {

                    runTest(test_mode, encState);
        }
      };
   
    t.setPriority(Thread.MIN_PRIORITY);
    t.setDaemon(true);
    t.start();
  }
View Full Code Here

      link_area.addLine( MessageText.getString( "installPluginsWizard.details.loading"));
    
        final StandardPlugin plugin = (StandardPlugin) selected_item.getData();
       
       
        AEThread detailsLoader = new AEThread("Detail Loader") {
          public void runSupport() {          
           final String description = HTMLUtils.convertListToString(HTMLUtils.convertHTMLToText(plugin.getDescription(),""));
           wizard.getDisplay().asyncExec(new AERunnable() {
            public void runSupport() {
              if(pluginList == null || pluginList.isDisposed() || pluginList.getSelectionCount() ==0)
                return;
              if(pluginList.getSelection()[0] != selected_item)
                return;
          
              link_area.reset();
             
              link_area.setRelativeURLBase( plugin.getRelativeURLBase());
             
              link_area.addLine(description);
            }
            });
          }
        };
       
        detailsLoader.setDaemon(true);
        detailsLoader.start();
    }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.util.AEThread

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.