Package org.gudy.azureus2.core3.disk

Examples of org.gudy.azureus2.core3.disk.DiskManager


      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

      updatePiecesInfo(false);     
    }
   
   
   
    DiskManager dm = manager.getDiskManager();
   
    String  remaining;
    String  eta      = DisplayFormatters.formatETA(manager.getStats().getETA());
   
    if ( dm != null ){
     
      long  rem = dm.getRemainingExcludingDND();
     
      String  data_rem = DisplayFormatters.formatByteCountToKiBEtc( rem );
     
      // append data length unless we have an eta value and none left
      
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.disk.DiskManager

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.