Package org.gudy.azureus2.ui.swt.mainwindow

Examples of org.gudy.azureus2.ui.swt.mainwindow.IMenuConstants


    itemDownSpeedManual.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        String kbps_str = MessageText.getString("MyTorrentsView.dialog.setNumber.inKbps",
            new String[]{ DisplayFormatters.getRateUnit(DisplayFormatters.UNIT_KB ) });

        SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow();
        entryWindow.initTexts("MyTorrentsView.dialog.setSpeed.title",
            new String[] {
              MessageText.getString(up_menu
                  ? "MyTorrentsView.dialog.setNumber.upload"
                  : "MyTorrentsView.dialog.setNumber.download")
            }, "MyTorrentsView.dialog.setNumber.text", new String[] {
              kbps_str,
              MessageText.getString(up_menu
                  ? "MyTorrentsView.dialog.setNumber.upload"
                  : "MyTorrentsView.dialog.setNumber.download")
            });

        entryWindow.prompt(new UIInputReceiverListener() {
          public void UIInputReceiverClosed(UIInputReceiver entryWindow) {
            if (!entryWindow.hasSubmittedInput()) {
              return;
            }
            String sReturn = entryWindow.getSubmittedInput();

            if (sReturn == null)
              return;

            int newSpeed;
View Full Code Here


    }
  }

  private static void changePriorityManual(final Object[] datasources) {

    SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow(
        "FilesView.dialog.priority.title",
        "FilesView.dialog.priority.text");
    entryWindow.prompt(new UIInputReceiverListener() {
      public void UIInputReceiverClosed(UIInputReceiver entryWindow) {
        if (!entryWindow.hasSubmittedInput()) {
          return;
        }
        String sReturn = entryWindow.getSubmittedInput();
       
        if (sReturn == null)
          return;
       
        int priority = -1;
View Full Code Here

      }
    });
  }

  private static String askForRenameFilename(DiskManagerFileInfo fileInfo) {
    SimpleTextEntryWindow dialog = new SimpleTextEntryWindow(
        "FilesView.rename.filename.title", "FilesView.rename.filename.text");
    dialog.setPreenteredText(fileInfo.getFile(true).getName(), false); // false -> it's not "suggested", it's a previous value
    dialog.allowEmptyInput(false);
    dialog.prompt();
    if (!dialog.hasSubmittedInput()) {
      return null;
    }
    return dialog.getSubmittedInput();
  }
View Full Code Here

          new Listener()
        {
              public void
          handleEvent(Event event)
              {
                new CertificateCreatorWindow();
              }
          });
     
      new Label(gSecurity, SWT.NULL );
     
View Full Code Here

  public static MenuItem addBetaMenuItem(Menu menuParent) {
    final MenuItem menuItem = addMenuItem(menuParent, MENU_ID_BETA_PROG,
        new Listener() {
          public void handleEvent(Event e) {
            new BetaWizard();
      }
    });

    COConfigurationManager.addAndFireParameterListener(
        "Beta Programme Enabled", new ParameterListener() {
View Full Code Here

    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.widthHint = 150;
    gridData.heightHint = 25;
    piecesImage.setLayoutData(gridData);

    piecesPercent = new BufferedLabel(gFile, SWT.RIGHT);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
    gridData.widthHint = 50;
    piecesPercent.setLayoutData(gridData);

    Label availabilityInfo = new Label(gFile, SWT.LEFT);
    Messages.setLanguageText(availabilityInfo, "GeneralView.section.availability");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    availabilityInfo.setLayoutData(gridData);

    availabilityImage = new Canvas(gFile, SWT.NULL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.widthHint = 150;
    gridData.heightHint = 25;
    availabilityImage.setLayoutData(gridData);
    Messages.setLanguageText(availabilityImage, "GeneralView.label.status.pieces_available.tooltip");

    availabilityPercent = new BufferedLabel(gFile, SWT.RIGHT);
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
    gridData.widthHint = 50;
    availabilityPercent.setLayoutData(gridData);
    Messages.setLanguageText(availabilityPercent.getWidget(), "GeneralView.label.status.pieces_available.tooltip");
   
    gTransfer = new Group(genComposite, SWT.SHADOW_OUT);
    Messages.setLanguageText(gTransfer, "GeneralView.section.transfer"); //$NON-NLS-1$
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gTransfer.setLayoutData(gridData);

    GridLayout layoutTransfer = new GridLayout();
    layoutTransfer.numColumns = 6;
    gTransfer.setLayout(layoutTransfer);

    Label label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.timeelapsed"); //$NON-NLS-1$
    timeElapsed = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    timeElapsed.setLayoutData(gridData);
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.remaining"); //$NON-NLS-1$
    timeRemaining = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    timeRemaining.setLayoutData(gridData);
    label = new Label(gTransfer, SWT.LEFT); //$NON-NLS-1$
    Messages.setLanguageText(label, "GeneralView.label.shareRatio");
    shareRatio = new BufferedLabel(gTransfer, SWT.LEFT); //$NON-NLS-1$
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    shareRatio.setLayoutData(gridData);

    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.downloaded"); //$NON-NLS-1$
    download = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    download.setLayoutData(gridData);
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.downloadspeed"); //$NON-NLS-1$
    downloadSpeed = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    downloadSpeed.setLayoutData(gridData);
    label = new Label(gTransfer, SWT.LEFT); //$NON-NLS-1$
    Messages.setLanguageText(label, "GeneralView.label.hashfails");
    hashFails = new BufferedLabel(gTransfer, SWT.LEFT); //$NON-NLS-1$
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    hashFails.setLayoutData(gridData);
   
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.uploaded"); //$NON-NLS-1$
    upload = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    upload.setLayoutData(gridData);   
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.uploadspeed"); //$NON-NLS-1$
    uploadSpeed = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 3;
    uploadSpeed.setLayoutData(gridData);
   
      // blah
   
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.seeds");
    seeds = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    seeds.setLayoutData(gridData);

    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.peers");
    peers = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    peers.setLayoutData(gridData);
   
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.completed");
    completedLbl = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    completedLbl.setLayoutData(gridData);


   
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.totalspeed");
    totalSpeed = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    totalSpeed.setLayoutData(gridData);
   
   
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.swarm_average_completion");
    ave_completion = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    ave_completion.setLayoutData(gridData);
   
    label = new Label(gTransfer, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.distributedCopies");
    distributedCopies = new BufferedLabel(gTransfer, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    distributedCopies.setLayoutData(gridData);
   

    ////////////////////////

    gInfo = new Group(genComposite, SWT.SHADOW_OUT);
    Messages.setLanguageText(gInfo, "GeneralView.section.info");
    gridData = new GridData(GridData.FILL_BOTH);
    gInfo.setLayoutData(gridData);

    GridLayout layoutInfo = new GridLayout();
    layoutInfo.numColumns = 4;
    gInfo.setLayout(layoutInfo);

    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.filename"); //$NON-NLS-1$
    fileName = new BufferedLabel(gInfo, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    fileName.setLayoutData(gridData);

    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.status"); //$NON-NLS-1$
    torrentStatus = new BufferedLabel(gInfo, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    torrentStatus.setLayoutData(gridData);

    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.savein"); //$NON-NLS-1$
    saveIn = new BufferedLabel(gInfo, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 3;
    saveIn.setLayoutData(gridData);

    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.totalsize"); //$NON-NLS-1$
    fileSize = new BufferedLabel(gInfo, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    fileSize.setLayoutData(gridData);

    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.numberofpieces"); //$NON-NLS-1$
    pieceNumber = new BufferedLabel(gInfo, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    pieceNumber.setLayoutData(gridData);

    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.hash"); //$NON-NLS-1$
    hash = new BufferedLabel(gInfo, SWT.LEFT);
    Messages.setLanguageText(hash.getWidget(), "GeneralView.label.hash.tooltip", true);
   
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    hash.setLayoutData(gridData);
      // click on hash -> copy to clipboard
    hash.setCursor(display.getSystemCursor(SWT.CURSOR_HAND));
    hash.setForeground(Colors.blue);
    label.addMouseListener(new MouseAdapter() {
      public void mouseDoubleClick(MouseEvent arg0) {
        String hash_str = hash.getText();
        if(hash_str != null && hash_str.length() != 0)
          new Clipboard(display).setContents(new Object[] {hash_str.replaceAll(" ","")}, new Transfer[] {TextTransfer.getInstance()});
      }
      public void mouseDown(MouseEvent arg0) {
        String hash_str = hash.getText();
        if(hash_str != null && hash_str.length() != 0)
          new Clipboard(display).setContents(new Object[] {hash_str.replaceAll(" ","")}, new Transfer[] {TextTransfer.getInstance()});
      }
    });
    hash.addMouseListener(new MouseAdapter() {
      public void mouseDoubleClick(MouseEvent arg0) {
        String hash_str = hash.getText();
        if(hash_str != null && hash_str.length() != 0)
          new Clipboard(display).setContents(new Object[] {hash_str.replaceAll(" ","")}, new Transfer[] {TextTransfer.getInstance()});
      }
      public void mouseDown(MouseEvent arg0) {
        String hash_str = hash.getText();
        if(hash_str != null && hash_str.length() != 0)
          new Clipboard(display).setContents(new Object[] {hash_str.replaceAll(" ","")}, new Transfer[] {TextTransfer.getInstance()});
      }
    });
   
   
    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.size");
    pieceSize = new BufferedLabel(gInfo, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    pieceSize.setLayoutData(gridData);
   
    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.creationdate");
    creation_date = new BufferedLabel(gInfo, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    creation_date.setLayoutData(gridData);
   
    label = new Label(gInfo, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.private");
    privateStatus = new BufferedLabel(gInfo, SWT.LEFT);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    privateStatus.setLayoutData(gridData);   

  // empty row
    label = new Label(gInfo, SWT.LEFT);
View Full Code Here

    }
  }
 
  private void buildHeaderArea() {
    if (cCategories == null) {
      cCategories = new CompositeMinSize(cTableParentPanel, SWT.NONE);
      ((CompositeMinSize) cCategories).setMinSize(new Point(SWT.DEFAULT, 24));
      GridData gridData = new GridData(SWT.RIGHT, SWT.TOP, true, false);
      cCategories.setLayoutData(gridData);
      cCategories.moveAbove(null);
    }else if ( cCategories.isDisposed()){
View Full Code Here

        // wiki link
     
      gridData = new GridData();
      gridData.horizontalSpan = 2;

      LinkLabel link = new LinkLabelgJVM, gridData, "ConfigView.label.please.visit.here",
                      "http://wiki.vuze.com/w/Java_VM_memory_usage");
     
        // info
     
      label = new Label(gJVM, SWT.NULL);
View Full Code Here

    Label info_label = new Label( rootPanel, SWT.WRAP );
    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    info_label.setLayoutData(gridData);
    info_label.setText( MessageText.getString( "beta.wizard.info" ));
    LinkLabel link = new LinkLabel( rootPanel, "beta.wizard.link", MessageText.getString( "beta.wizard.link.url" ));
    Label link_label = link.getlabel();
   
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.verticalIndent=10;
    link_label.setLayoutData(gridData);

    final Composite gRadio = new Composite(rootPanel, SWT.NULL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
      gridData.verticalIndent=10;
    gRadio.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 1;
    gRadio.setLayout( layout );


    Button off_button = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(off_button, "beta.wizard.off");
    final Button on_button = new Button (gRadio, SWT.RADIO);
    Messages.setLanguageText(on_button, "beta.wizard.on");
   
    SelectionAdapter l = new SelectionAdapter()
      {
        public void
        widgetSelected(
          SelectionEvent arg0 )
        {
          wizard.setBetaEnabled( on_button.getSelection());
        }
      };
    off_button.addSelectionListener(l);
    on_button.addSelectionListener(l);
   
    on_button.setSelection( wizard.getBetaEnabled());
    off_button.setSelection( !wizard.getBetaEnabled());

    LinkLabel forum = new LinkLabel( rootPanel, "beta.wizard.forum", MessageText.getString( "beta.wizard.forum.url" ));
    Label forum_label = link.getlabel();
   
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.verticalIndent=10;
    forum_label.setLayoutData(gridData);
View Full Code Here

          new String[] { param1, param2 } ));

      return cSection;
    }
   
    new LinkLabel(cSection, gridData, CFG_PREFIX
        + "info.link", MessageText.getString(CFG_PREFIX + "url"));

    ///////////////////////   ADVANCED SOCKET SETTINGS GROUP //////////
   
    Group gSocket = new Group(cSection, SWT.NULL);
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.ui.swt.mainwindow.IMenuConstants

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.