Package org.gudy.azureus2.ui.swt.config

Examples of org.gudy.azureus2.ui.swt.config.IntListParameter


                  Debug.out( "Shell doesn't exist" );
                 
                  return( null );
                }
               
                StringListChooser chooser = new StringListChooser( shell );
               
                chooser.setTitle( decision_name );
                chooser.setText( decision_description );
               
                for (int i=0;i<options.length;i++){
                 
                  chooser.addOption( options[i] );
                }
               
                String  result = chooser.open();
               
                return( result );
              }
             
              return( null );
View Full Code Here


    }

    /**
     * Old-style speed menus.
     */
    new BooleanParameter(cSection, "GUI_SWT_bOldSpeedMenu", LBLKEY_PREFIX
        + "use_old_speed_menus");

    BooleanParameter bpCustomTab = new BooleanParameter(cSection,
        "useCustomTab", "ConfigView.section.style.useCustomTabs");
    Control cFancyTab = new BooleanParameter(cSection, "GUI_SWT_bFancyTab",
        "ConfigView.section.style.useFancyTabs").getControl();

    Control[] controls = {
      cFancyTab
    };
    bpCustomTab.setAdditionalActionPerformer(new ChangeSelectionActionPerformer(
        controls));

    return cSection;
  }
View Full Code Here

        "ConfigView.section.style.useFancyTabs").getControl();

    Control[] controls = {
      cFancyTab
    };
    bpCustomTab.setAdditionalActionPerformer(new ChangeSelectionActionPerformer(
        controls));

    return cSection;
  }
View Full Code Here

  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority");
  String fpLabels[] = { MessageText.getString("ConfigView.text.all"),
      MessageText.getString("ConfigView.text.any") };
  int fpValues[] = { DefaultRankCalculator.FIRSTPRIORITY_ALL,
      DefaultRankCalculator.FIRSTPRIORITY_ANY };
  new IntListParameter(cArea, "StartStopManager_iFirstPriority_Type",
      fpLabels, fpValues);
  label = new Label(cArea, SWT.NULL);
  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.following");

    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.shareRatio");
    String minQueueLabels[] = new String[55];
    int minQueueValues[] = new int[55];
    minQueueLabels[0] = "1:2 (" + 0.5 + ")";
    minQueueValues[0] = 500;
  minQueueLabels[1] = "3:4 (" + 0.75 +")";
  minQueueValues[1] = 750;
  minQueueLabels[2] = "1:1";
  minQueueValues[2] = 1000;
  minQueueLabels[3] = "5:4 (" + 1.25 +")";
  minQueueValues[3] = 1250;
  minQueueLabels[4] = "3:2 (" + 1.50 +")";
  minQueueValues[4] = 1500;
  minQueueLabels[5] = "7:4 (" + 1.75 +")";
  minQueueValues[5] = 1750;
    for (int i = 6; i < minQueueLabels.length; i++) {
      minQueueLabels[i] = i - 4 + ":1";
      minQueueValues[i] = (i - 4) * 1000;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_ShareRatio",
                         minQueueLabels, minQueueValues);

  String sMinutes = MessageText.getString("ConfigView.text.minutes");
    String sHours = MessageText.getString("ConfigView.text.hours");
 
    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.DLMinutes");

    String dlTimeLabels[] = new String[15];
    int dlTimeValues[] = new int[15];
    dlTimeLabels[0] = MessageText.getString("ConfigView.text.ignore");
    dlTimeValues[0] = 0;
    for (int i = 1; i < dlTimeValues.length; i++) {
      dlTimeLabels[i] = "<= " + (i + 2) + " " + sHours ;
      dlTimeValues[i] = (i + 2) * 60;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_DLMinutes",
                         dlTimeLabels, dlTimeValues);
 
  label = new Label(cFirstPriorityArea, SWT.WRAP);
 
    // row
    label = new Label(cFP, SWT.NULL);
    Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.seedingMinutes");

    String seedTimeLabels[] = new String[15];
    int seedTimeValues[] = new int[15];
    seedTimeLabels[0] = MessageText.getString("ConfigView.text.ignore");
    seedTimeValues[0] = 0;
    seedTimeLabels[1] = "<= 90 " + sMinutes;
    seedTimeValues[1] = 90;
    for (int i = 2; i < seedTimeValues.length; i++) {
      seedTimeLabels[i] = "<= " + i + " " + sHours ;
      seedTimeValues[i] = i * 60;
    }
    new IntListParameter(cFP, "StartStopManager_iFirstPriority_SeedingMinutes",
                         seedTimeLabels, seedTimeValues);

 
 
//   Group Ignore FP
 
    Composite cIgnoreFP = new Group(cFirstPriorityArea, SWT.NULL);
    layout = new GridLayout();
    layout.numColumns = 2;
    layout.verticalSpacing = 6;
  cIgnoreFP.setLayout(layout);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
  cIgnoreFP.setLayoutData(gridData);
    Messages.setLanguageText(cIgnoreFP, "ConfigView.label.seeding.firstPriority.ignore");
 
  // Ignore S:P Ratio
  label = new Label(cIgnoreFP, SWT.NULL);
  Messages.setLanguageText(label, "ConfigView.label.seeding.firstPriority.ignoreSPRatio");
  String ignoreSPRatioLabels[] = new String[15];
    int ignoreSPRatioValues[] = new int[15];
  ignoreSPRatioLabels[0] = MessageText.getString("ConfigView.text.ignore");
  ignoreSPRatioValues[0] = 0;
    for (int i = 1; i < ignoreSPRatioLabels.length; i++) {
    ignoreSPRatioLabels[i] = i * 10 + " " + ":1" ;
    ignoreSPRatioValues[i] = i * 10;
    }
  new IntListParameter(cIgnoreFP, "StartStopManager_iFirstPriority_ignoreSPRatio", 0,
              ignoreSPRatioLabels, ignoreSPRatioValues);

  //   Ignore 0 Peers
    new BooleanParameter(cIgnoreFP,
                         "StartStopManager_bFirstPriority_ignore0Peer",
                         "ConfigView.label.seeding.firstPriority.ignore0Peer");

    label = new Label(cIgnoreFP, SWT.NULL);

    // Ignore idle hours
    label = new Label(cIgnoreFP, SWT.NULL);
    Messages.setLanguageText(label,
        "ConfigView.label.seeding.firstPriority.ignoreIdleHours");
    int[] availIdleHours = { 2, 3, 4, 5, 6, 7, 8, 12, 18, 24, 48, 72, 168 };
    String ignoreIdleHoursLabels[] = new String[availIdleHours.length + 1];
    int ignoreIdleHoursValues[] = new int[availIdleHours.length + 1];
    ignoreIdleHoursLabels[0] = MessageText.getString("ConfigView.text.ignore");
    ignoreIdleHoursValues[0] = 0;
    for (int i = 0; i < availIdleHours.length; i++) {
      ignoreIdleHoursLabels[i + 1] = availIdleHours[i] + " " + sHours;
      ignoreIdleHoursValues[i + 1] = availIdleHours[i];
    }
    new IntListParameter(cIgnoreFP,
        "StartStopManager_iFirstPriority_ignoreIdleHours", 0,
        ignoreIdleHoursLabels, ignoreIdleHoursValues);

  //   row
  cArea1 = new Composite(cIgnoreFP, SWT.NULL);
View Full Code Here

    label = new Label(cSection, SWT.NULL);
    Messages.setLanguageText(label, LBLKEY_PREFIX + "password");

    gridData = new GridData();
    gridData.widthHint = 150;
    PasswordParameter pw1 = new PasswordParameter(cSection, "Password");
    pw1.setLayoutData(gridData);
    Text t1 = (Text) pw1.getControl();

    //password confirm

    label = new Label(cSection, SWT.NULL);
    Messages.setLanguageText(label, LBLKEY_PREFIX + "passwordconfirm");
    gridData = new GridData();
    gridData.widthHint = 150;
    PasswordParameter pw2 = new PasswordParameter(cSection, "Password Confirm");
    pw2.setLayoutData(gridData);
    Text t2 = (Text) pw2.getControl();

    // password activated

    label = new Label(cSection, SWT.NULL);
    Messages.setLanguageText(label, LBLKEY_PREFIX + "passwordmatch");
View Full Code Here

  }

  public static MenuItem addConfigWizardMenuItem(Menu menu) {
    return addMenuItem(menu, MENU_ID_CONFIGURE, new Listener() {
      public void handleEvent(Event e) {
        new ConfigureWizard(false,ConfigureWizard.WIZARD_MODE_FULL);
      }
    });
  }
View Full Code Here

              uiFunctions.dispose(true, false);
            }
            return noErr;
          }
          case kHICommandWizard:
            new ConfigureWizard(false,ConfigureWizard.WIZARD_MODE_FULL);
            return noErr;
          case kHICommandNatTest:
            new NatTestWindow();
            return noErr;
          case kHICommandSpeedTest:
View Full Code Here

      UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
      if (uiFunctions != null) {
        uiFunctions.dispose(true, false);
      }
    } else if (sel == sel_wizardMenuSelected_) {
      new ConfigureWizard(false,ConfigureWizard.WIZARD_MODE_FULL);
    } else if (sel == sel_natMenuSelected_) {
      new NatTestWindow();
    } else if (sel == sel_speedMenuSelected_) {
      new SpeedTestWizard();
    } else if (sel == sel_toolbarButtonClicked_) {
View Full Code Here

  public static MenuItem addExportMenuItem(Menu menuParent) {
    MenuItem file_export = addMenuItem(menuParent, MENU_ID_EXPORT,
        new Listener() {
          public void handleEvent(Event e) {
            new ExportTorrentWizard();
          }
        });
    return file_export;
  }
View Full Code Here

  public static MenuItem addImportMenuItem(Menu menuParent) {
    MenuItem file_import = addMenuItem(menuParent, MENU_ID_IMPORT,
        new Listener() {
          public void handleEvent(Event e) {
            new ImportTorrentWizard();
          }
        });
    return file_import;
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.ui.swt.config.IntListParameter

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.