Package org.gudy.azureus2.core3.torrent

Examples of org.gudy.azureus2.core3.torrent.TOTorrentFile


      Category[] categories = CategoryManager.getCategories();
      Arrays.sort(categories);

      if (categories.length > 0) {
        Category catUncat = CategoryManager.getCategory(Category.TYPE_UNCATEGORIZED);
        if (catUncat != null) {
          final MenuItem itemCategory = new MenuItem(menuCategory, SWT.PUSH);
          Messages.setLanguageText(itemCategory, catUncat.getName());
          itemCategory.setData("Category", catUncat);
          itemCategory.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event event) {
              MenuItem item = (MenuItem)event.widget;
              assignSelectedToCategory((Category)item.getData("Category"));
View Full Code Here


    }
 
    private void addCategory() {
      CategoryAdderWindow adderWindow = new CategoryAdderWindow(Display.getDefault());
      Category newCategory = adderWindow.getNewCategory();
      if (newCategory != null)
        assignSelectedToCategory(newCategory);
    }
View Full Code Here

      // It may be the categories array just contains "uncategorised".
      allow_category_selection = user_category_found;
    }

    if (allow_category_selection) {
      final Category catUncat = CategoryManager.getCategory(Category.TYPE_UNCATEGORIZED);
      if (catUncat != null) {
        final MenuItem itemCategory = new MenuItem(menuCategory, SWT.PUSH);
        Messages.setLanguageText(itemCategory, catUncat.getName());
        itemCategory.addListener(SWT.Selection, new DMTask(dms) {
          public void run(DownloadManager dm) {
            dm.getDownloadState().setCategory(catUncat);
          }
        });

        new MenuItem(menuCategory, SWT.SEPARATOR);
      }

      for (i = 0; i < categories.length; i++) {
        final Category category = categories[i];
        if (category.getType() == Category.TYPE_USER) {
          final MenuItem itemCategory = new MenuItem(menuCategory, SWT.PUSH);
          itemCategory.setText(category.getName());
          itemCategory.addListener(SWT.Selection, new DMTask(dms) {
            public void run(DownloadManager dm) {
              dm.getDownloadState().setCategory(category);
            }
          });
        }
      }

      new MenuItem(menuCategory, SWT.SEPARATOR);
    }

    final MenuItem itemAddCategory = new MenuItem(menuCategory, SWT.PUSH);
    Messages.setLanguageText(itemAddCategory, "MyTorrentsView.menu.setCategory.add");

    itemAddCategory.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager[] dms) {
        CategoryAdderWindow adderWindow = new CategoryAdderWindow(composite.getDisplay());
        Category newCategory = adderWindow.getNewCategory();
        if (newCategory != null) assignToCategory(dms, newCategory);
      }
    });

  }
View Full Code Here

        UIFunctionsManagerSWT.getUIFunctionsSWT().dispose(false, false);
      }
    });

    // let platform decide
    ParameterListener paramListener = new ParameterListener() {
      public void parameterChanged(String parameterName) {
        if (COConfigurationManager.getBooleanParameter("Enable System Tray")
            && COConfigurationManager.getBooleanParameter("Close To Tray")) {
          KeyBindings.removeAccelerator(file_exit, MENU_ID_EXIT);
        } else {
View Full Code Here

                  !isToolbarVisible);
            }
          }
        });

    final ParameterListener listener = new ParameterListener() {
      public void parameterChanged(String parameterName) {
        item.setSelection(COConfigurationManager.getBooleanParameter(parameterName));
      }
    };
View Full Code Here

            new BetaWizard();
      }
    });

    COConfigurationManager.addAndFireParameterListener(
        "Beta Programme Enabled", new ParameterListener() {
          public void parameterChanged(String parameterName) {
            Utils.execSWTThread(new AERunnable() {
              public void runSupport() {
                if ( menuItem.isDisposed()){
                  return;
View Full Code Here

      }
    });

    updateDataDirCombo();
    dirList = COConfigurationManager.getStringListParameter("saveTo_list");
    StringIterator iter = dirList.iterator();
    while (iter.hasNext()) {
      String s = iter.next();
      if (!s.equals(sDestDir)) {
        cmbDataDir.add(s);
      }
    }
View Full Code Here

              String configAutoKey = TransferSpeedValidator.getActiveAutoUploadParameter(globalManager);

              COConfigurationManager.setParameter(configAutoKey, false);
            }

            final int cValue = ((Integer) new TransferSpeedValidator(configKey,
                new Integer(newSpeed)).getValue()).intValue();

            COConfigurationManager.setParameter(configKey, cValue);

            COConfigurationManager.save();
View Full Code Here

                              TransferSpeedValidator.getActiveAutoUploadParameter(globalManager);
              
                            COConfigurationManager.setParameter( configAutoKey, false );
                          }
                         
                          final int cValue = ((Integer)new TransferSpeedValidator(configKey, (Number)items[i].getData("maxkb")).getValue()).intValue();
                          COConfigurationManager.setParameter(configKey, cValue);
                         

                          COConfigurationManager.save();
                      }
View Full Code Here

    List<SelectedContent> listSelected = new ArrayList<SelectedContent>(dataSources.length);
    for (Object ds : dataSources) {
      if (ds instanceof DownloadManager) {
        listSelected.add(new SelectedContent((DownloadManager) ds));
      } else if (ds instanceof DiskManagerFileInfo) {
        DiskManagerFileInfo fileInfo = (DiskManagerFileInfo) ds;
        listSelected.add(new SelectedContent(fileInfo.getDownloadManager(), fileInfo.getIndex()));
      }
    }
    SelectedContent[] content = listSelected.toArray(new SelectedContent[0]);
    SelectedContentManager.changeCurrentlySelectedContent(tv.getTableID(), content, tv);
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.torrent.TOTorrentFile

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.