Package org.gudy.azureus2.core3.config

Examples of org.gudy.azureus2.core3.config.COConfigurationListener


      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

    for (int i = 0; i < ignoredComponents.length; i++) {
      ignoredComponents[i] = new ArrayList();
    }

    if (!overrideLog) {
      config.addListener(new COConfigurationListener() {
        public void configurationSaved() {
          checkLoggingConfig();
        }
      });
    }
View Full Code Here

  ShareManagerImpl()
 
    throws ShareException
  {
    COConfigurationManager.addListener(
      new COConfigurationListener()
      {
        public void
        configurationSaved()
        {
          announce_urls  = null;
View Full Code Here

    }
   
    id = ByteFormatter.encodeString( new SHA1Simple().calculateHash( id.getBytes()));
   
    COConfigurationManager.addListener(
      new COConfigurationListener()
      {
        public void
        configurationSaved()
        {
          readConfig( false );
View Full Code Here

    try {
      downloadData_this_mon.enter();

      if (configListener == null) {

        configListener = new COConfigurationListener() {
          public void configurationSaved() {
            reloadConfigParams(rules.plugin_config);
          }
        };
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

TOP

Related Classes of org.gudy.azureus2.core3.config.COConfigurationListener

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.