Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.GridLayout


  }


  public Composite configSectionCreate(final Composite parent) {
    GridData gridData;
    GridLayout layout;
    Label  label;
    int userMode = COConfigurationManager.getIntParameter("User Mode");

    // extensions tab set up
    Composite gMainTab = new Composite(parent, SWT.NULL);
    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    gMainTab.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 3;
    gMainTab.setLayout(layout);

      //////////////////////SCRAPE GROUP ///////////////////
   
    Group scrapeGroup = new Group(gMainTab,SWT.NULL);
    Messages.setLanguageText(scrapeGroup,"ConfigView.group.scrape");
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 1;
    scrapeGroup.setLayout(gridLayout);
   
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 3;
    scrapeGroup.setLayoutData( gridData );
   
    label = new Label(scrapeGroup, SWT.WRAP);
    label.setLayoutData(Utils.getWrappableLabelGridData(1, GridData.FILL_HORIZONTAL));
    Messages.setLanguageText(label, "ConfigView.section.tracker.client.scrapeinfo");

    BooleanParameter  scrape =
      new BooleanParameter(scrapeGroup, "Tracker Client Scrape Enable",
                  "ConfigView.section.tracker.client.scrapeenable");
   
    BooleanParameter  scrape_stopped =
      new BooleanParameter(scrapeGroup, "Tracker Client Scrape Stopped Enable",
                  "ConfigView.section.tracker.client.scrapestoppedenable");
   
    scrape.setAdditionalActionPerformer(new ChangeSelectionActionPerformer( scrape_stopped.getControls()));

    new BooleanParameter(scrapeGroup, "Tracker Client Scrape Single Only",
                  "ConfigView.section.tracker.client.scrapesingleonly");
   
    /////////////////////////
   
    // row

    gridData = new GridData();
    gridData.horizontalSpan = 2;
 
    new BooleanParameter(gMainTab, "Tracker Client Send OS and Java Version",
                         "ConfigView.section.tracker.sendjavaversionandos").setLayoutData(gridData);

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

//////////////////////
   
    BooleanParameter enableUDP = new BooleanParameter(gMainTab, "Server Enable UDP", "ConfigView.section.server.enableudp");
    gridData = new GridData();
    gridData.horizontalSpan = 2;
    enableUDP.setLayoutData(gridData);
   
    label = new Label(gMainTab, SWT.NULL);
 
//////////////////////
   
    BooleanParameter enableUDPProbe = new BooleanParameter(gMainTab, "Tracker UDP Probe Enable", "ConfigView.section.server.enableudpprobe");
    gridData = new GridData();
    gridData.horizontalSpan = 2;
    enableUDPProbe.setLayoutData(gridData);
   
    label = new Label(gMainTab, SWT.NULL);
 
    enableUDP.setAdditionalActionPerformer(new ChangeSelectionActionPerformer( enableUDPProbe.getControls()));

   
//////////////////////
   
    BooleanParameter showWarnings = new BooleanParameter(gMainTab, "Tracker Client Show Warnings", "ConfigView.section.tracker.client.showwarnings" );
    gridData = new GridData();
    gridData.horizontalSpan = 2;
  showWarnings.setLayoutData(gridData);
   
    label = new Label(gMainTab, SWT.NULL);
   
    if (userMode > 0) {
   
//////////////////////OVERRIDE GROUP ///////////////////
   
    Group overrideGroup = new Group(gMainTab,SWT.NULL);
    Messages.setLanguageText(overrideGroup,"ConfigView.group.override");
    gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    overrideGroup.setLayout(gridLayout);
   
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 3;
View Full Code Here


 

  public Composite configSectionCreate(final Composite parent) {
    GridData gridData;
  GridLayout layout;

    Composite gSharing = new Composite(parent, SWT.WRAP);
    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    gSharing.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 2;
    layout.marginHeight = 0;
    gSharing.setLayout(layout);

      // row
View Full Code Here

    bOk = false;

    shell = ShellFactory.createMainShell(SWT.APPLICATION_MODAL | SWT.TITLE | SWT.CLOSE);
    shell.setText(MessageText.getString("PasswordWindow.title"));
    Utils.setShellIcon(shell);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    layout.makeColumnsEqualWidth = true;
    shell.setLayout(layout);
   
    Label label = new Label(shell,SWT.NONE);
View Full Code Here

  public Composite configSectionCreate(final Composite parent) {
    ImageLoader imageLoader = ImageLoader.getInstance();
    Image imgOpenFolder = imageLoader.getImage("openFolderButton");

    GridData gridData;
    GridLayout layout;

    // Sub-Section: File -> Torrent
    // ----------------------------
    Composite cTorrent = new Composite(parent, SWT.NULL);

    gridData = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL);
    cTorrent.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 2;
    cTorrent.setLayout(layout);
   
    int userMode = COConfigurationManager.getIntParameter("User Mode");
   
   
    // Save .Torrent files to..
    BooleanParameter saveTorrents = new BooleanParameter(cTorrent, "Save Torrent Files",
                                                         "ConfigView.label.savetorrents");

    Composite gSaveTorrents = new Composite(cTorrent, SWT.NULL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalIndent = 25;
    gridData.horizontalSpan = 2;
    gSaveTorrents.setLayoutData(gridData);
    layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    layout.numColumns = 3;
    gSaveTorrents.setLayout(layout);

    Label lSaveDir = new Label(gSaveTorrents, SWT.NULL);
    Messages.setLanguageText(lSaveDir, "ConfigView.label.savedirectory");

    gridData = new GridData(GridData.FILL_HORIZONTAL);
    final StringParameter torrentPathParameter = new StringParameter(gSaveTorrents,
                                                                     "General_sDefaultTorrent_Directory");
    torrentPathParameter.setLayoutData(gridData);

    Button browse2 = new Button(gSaveTorrents, SWT.PUSH);
    browse2.setImage(imgOpenFolder);
    imgOpenFolder.setBackground(browse2.getBackground());
    browse2.setToolTipText(MessageText.getString("ConfigView.button.browse"));

    browse2.addListener(SWT.Selection, new Listener() {
      /* (non-Javadoc)
       * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
       */
      public void handleEvent(Event event) {
        DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
        dialog.setFilterPath(torrentPathParameter.getValue());
        dialog.setText(MessageText.getString("ConfigView.dialog.choosedefaulttorrentpath"));
        String path = dialog.open();
        if (path != null) {
          torrentPathParameter.setValue(path);
        }
      }
    });
    browse2.setLayoutData(new GridData());

    gridData = new GridData();
    gridData.horizontalSpan = 2;
    new BooleanParameter(gSaveTorrents, "Save Torrent Backup",
                        "ConfigView.label.savetorrentbackup").setLayoutData(gridData);

    Control[] controls = new Control[]{ gSaveTorrents };
    IAdditionalActionPerformer grayPathAndButton1 = new ChangeSelectionActionPerformer(controls);
    saveTorrents.setAdditionalActionPerformer(grayPathAndButton1);

    gridData = new GridData();
    gridData.horizontalSpan = 2;
    new BooleanParameter(
        cTorrent,
      "Default Start Torrents Stopped",
        "ConfigView.label.defaultstarttorrentsstopped").setLayoutData(gridData);


    // Watch Folder
    BooleanParameter watchFolder = new BooleanParameter(cTorrent, "Watch Torrent Folder",
                                                        "ConfigView.label.watchtorrentfolder");

    Composite gWatchFolder = new Composite(cTorrent, SWT.NULL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalIndent = 25;
    gridData.horizontalSpan = 2;
    gWatchFolder.setLayoutData(gridData);
    layout = new GridLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    layout.numColumns = 3;
    gWatchFolder.setLayout(layout);

View Full Code Here

    return 0;
  }

  public Composite configSectionCreate(final Composite parent) {
    Label label;
    GridLayout layout;
    GridData gridData;
    Composite cMain = new Composite( parent,  SWT.NULL );
    cMain.setLayoutData( new GridData( GridData.FILL_BOTH ) );
    layout = new GridLayout();
    layout.numColumns = 1;
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    cMain.setLayout( layout );
   
View Full Code Here

    }

    gridData = new GridData(GridData.FILL_BOTH);
    cScrapeInfoView.setLayoutData(gridData);

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

    label = new Label(cScrapeInfoView, SWT.LEFT);
    Messages.setLanguageText(label, "GeneralView.label.trackerurl"); //$NON-NLS-1$
View Full Code Here

   
    if (sTitleID != null) shell.setText(MessageText.keyExists(sTitleID)?MessageText.getString(sTitleID):sTitleID);
   
    Utils.setShellIcon(shell);
   
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    shell.setLayout(layout);

    Label label = new Label(shell, SWT.NONE);
    if (sMessageID != null) label.setText(MessageText.keyExists(sMessageID)?MessageText.getString(sMessageID):sMessageID);
View Full Code Here

          return cSection;
        }
       
        gridData = new GridData(GridData.VERTICAL_ALIGN_FILL|GridData.HORIZONTAL_ALIGN_FILL);
        cSection.setLayoutData(gridData);
        GridLayout subPanel = new GridLayout();
        subPanel.numColumns = 3;
        cSection.setLayout(subPanel);

        //V1, V2 ... drop down.

        //enable auto-speed beta
        ///////////////////////////////////
        // AutoSpeed Beta mode group
        ///////////////////////////////////
        //Beta-mode grouping.
        Group modeGroup = new Group(cSection, SWT.NULL);
        Messages.setLanguageText(modeGroup,"ConfigTransferAutoSpeed.algorithm.selector");
        GridLayout modeLayout = new GridLayout();
        modeLayout.numColumns = 3;
        modeGroup.setLayout(modeLayout);
       
        gridData = new GridData(GridData.FILL_HORIZONTAL);
        modeGroup.setLayoutData(gridData);

        //Need a drop down to select which method will be used.
        Label label = new Label(modeGroup, SWT.NULL);
        Messages.setLanguageText(label,"ConfigTransferAutoSpeed.algorithm");
        gridData = new GridData();
        label.setLayoutData(gridData);

        String AutoSpeedClassic = MessageText.getString("ConfigTransferAutoSpeed.auto.speed.classic");
        String AutoSpeedBeta = MessageText.getString("ConfigTransferAutoSpeed.auto.speed.beta");
        String AutoSpeedNeural = MessageText.getString("ConfigTransferAutoSpeed.auto.speed.neural");
       
        String[] modeNames = {
                AutoSpeedClassic,
                AutoSpeedBeta,
                AutoSpeedNeural,
               };
       
        String[] modes = {
                "1",
                "2",
                "3",
        };

        //versionList = new StringListParameter(modeGroup,
        //        SpeedManagerImpl.CONFIG_VERSION_STR,
        //        "1",
        //        modeNames,modes,true);
        versionList = new StringListParameter(modeGroup,SpeedManagerImpl.CONFIG_VERSION_STR, modeNames, modes);
        long verNum = COConfigurationManager.getLongParameter( SpeedManagerImpl.CONFIG_VERSION );
        if( verNum==1 ){
            //SpeedManagerAlgorithmProviderV1
            versionList.setValue(modes[0]);
        }else if( verNum==2 ){
            //SpeedManagerAlgorithmProviderV2
            versionList.setValue(modes[1]);
        }else if( verNum==3 ){
            //SpeedManagerAlgorithmProviderV2
            versionList.setValue(modes[2]);
        }else{
            //Default is currently version ...V1.
            versionList.setValue(modes[0]);
            //ToDo: log this condition.
        }

        versionList.addChangeListener( new ConvertToLongChangeListener() );


        //spacer
        Label spacer = new Label(modeGroup, SWT.NULL);
        gridData = new GridData();
        gridData.horizontalSpan=3;
        spacer.setLayoutData(gridData);

        //To enable the beta.
        gridData = new GridData();
        gridData.horizontalIndent = 20;
        gridData.horizontalSpan = 2;
        enableAutoSpeed = new BooleanParameter(modeGroup,
                TransferSpeedValidator.AUTO_UPLOAD_ENABLED_CONFIGKEY,CFG_PREFIX+"enableauto");
        enableAutoSpeed.setLayoutData(gridData);

        //enableAutoSpeed.addChangeListener( new GroupModeChangeListener() );

        spacer = new Label(modeGroup, SWT.NULL);

        //AutoSpeed while seeding enabled.
        enableAutoSpeedWhileSeeding = new BooleanParameter(modeGroup,
                "Auto Upload Speed Seeding Enabled",CFG_PREFIX+"enableautoseeding");
        gridData = new GridData();
        gridData.horizontalIndent = 20;
        gridData.horizontalSpan = 2;
        enableAutoSpeedWhileSeeding.setLayoutData(gridData);

    enableAutoSpeed.setAdditionalActionPerformer(
          new ChangeSelectionActionPerformer( enableAutoSpeedWhileSeeding.getControls(), true ));      


        spacer = new Label(modeGroup, SWT.NULL);

        spacer = new Label(cSection, SWT.NULL);
        gridData = new GridData();
        gridData.horizontalSpan=3;
        spacer.setLayoutData(gridData);

          // NETWORK GROUP
       
        Group networkGroup = new Group(cSection, SWT.NULL);
        //networkGroup.addControlListener(new Utils.LabelWrapControlListener());

        Messages.setLanguageText(networkGroup,CFG_PREFIX+"networks");   
        GridLayout networksLayout = new GridLayout();
        networksLayout.numColumns = 5;
        networkGroup.setLayout(networksLayout);

        gridData = new GridData(GridData.FILL_HORIZONTAL);
        networkGroup.setLayoutData(gridData);

          // asn
       
        label = new Label(networkGroup, SWT.NULL);
        Messages.setLanguageText(label,"SpeedView.stats.asn");   
   
        final Label asn_label = new Label(networkGroup, SWT.NULL);
        gridData = new GridData();
        gridData.horizontalSpan = 4;
        gridData.grabExcessHorizontalSpace = true;
        asn_label.setLayoutData(gridData);

          // up cap
       
        label = new Label(networkGroup, SWT.NULL);
        Messages.setLanguageText(label,"SpeedView.stats.estupcap");   
        gridData = new GridData();
        gridData.horizontalIndent = 20;
        label.setLayoutData(gridData);

        final Label up_cap = new Label(networkGroup, SWT.NULL);
        gridData = new GridData(GridData.FILL_HORIZONTAL);
        gridData.horizontalSpan = 4;
        up_cap.setLayoutData(gridData);

          // down cap

        label = new Label(networkGroup, SWT.NULL);
        Messages.setLanguageText(label,"SpeedView.stats.estdowncap");   
        gridData = new GridData();
        gridData.horizontalIndent = 20;
        label.setLayoutData(gridData);
       
        final Label down_cap = new Label(networkGroup, SWT.NULL);
        gridData = new GridData(GridData.FILL_HORIZONTAL);
        gridData.horizontalSpan = 4;
        down_cap.setLayoutData(gridData);

        // Core avail: We check at top
        final SpeedManager sm = AzureusCoreFactory.getSingleton().getSpeedManager()
       
        final TransferStatsView.limitToTextHelper  limit_to_text = new TransferStatsView.limitToTextHelper();
       
        asn_label.setText( sm.getASN());
        up_cap.setText( limit_to_text.getLimitText( sm.getEstimatedUploadCapacityBytesPerSec()));
        down_cap.setText( limit_to_text.getLimitText( sm.getEstimatedDownloadCapacityBytesPerSec()));
      
          // space
       
       spacer = new Label(networkGroup, SWT.NULL);
        gridData = new GridData();
        gridData.horizontalSpan=5;
        spacer.setLayoutData(gridData);
       
          // info
       
      Label info_label = new Label(networkGroup, SWT.WRAP );
      Messages.setLanguageText(
          info_label, CFG_PREFIX + "network.info",
          new String[]{ DisplayFormatters.getRateUnit( DisplayFormatters.UNIT_KB )});
      info_label.setLayoutData(Utils.getWrappableLabelGridData(5, 0));
       
        // up set
     
      label = new Label(networkGroup, SWT.NULL);
      Messages.setLanguageText(label,"SpeedView.stats.estupcap");   
      gridData = new GridData();
      gridData.horizontalIndent = 20;
      label.setLayoutData(gridData);

        String co_up    = "AutoSpeed Network Upload Speed (temp)";
        String co_up_type   = "AutoSpeed Network Upload Speed Type (temp)";

        SpeedManagerLimitEstimate up_lim = sm.getEstimatedUploadCapacityBytesPerSec();
       
        COConfigurationManager.setParameter( co_up, up_lim.getBytesPerSec()/1024 );
    COConfigurationManager.setParameter( co_up_type, limit_to_text.getSettableType( up_lim ));
   
    final IntParameter max_upload = new IntParameter(networkGroup, co_up );
       
    final Label upload_bits = new Label(networkGroup, SWT.NULL);
      gridData = new GridData();
      upload_bits.setLayoutData(gridData);
      upload_bits.setText(getMBitLimit(limit_to_text,(up_lim.getBytesPerSec()/1024)*1024));
   
    final StringListParameter max_upload_type =
      new StringListParameter(networkGroup, co_up_type, limit_to_text.getSettableTypes(),limit_to_text.getSettableTypes() );
     
    max_upload_type.addChangeListener(
      new ParameterChangeAdapter()
      {
        public void
        parameterChanged(
          Parameter   p,
          boolean   caused_internally )
        {
          if ( max_upload_type.isDisposed()){
         
            return;
          }
         
          float type = limit_to_text.textToType( max_upload_type.getValue());
             
          SpeedManagerLimitEstimate existing = sm.getEstimatedUploadCapacityBytesPerSec();
         
          if ( existing.getEstimateType() != type ){
         
            sm.setEstimatedUploadCapacityBytesPerSec( existing.getBytesPerSec(), type );
          }
        }
      });
     
    max_upload.addChangeListener(
      new ParameterChangeAdapter()
      {
        public void
        parameterChanged(
          Parameter   p,
          boolean   caused_internally )
        {
          if ( max_upload.isDisposed()){
         
            return;
          }
                   
          int  value = max_upload.getValue() * 1024;
               
          SpeedManagerLimitEstimate existing = sm.getEstimatedUploadCapacityBytesPerSec();
         
          if ( existing.getBytesPerSec() != value ){
         
            sm.setEstimatedUploadCapacityBytesPerSec( value, existing.getEstimateType());
          }
        }
      });     
   
      label = new Label(networkGroup, SWT.NULL);

        // down set
     
      label = new Label(networkGroup, SWT.NULL);
      Messages.setLanguageText(label,"SpeedView.stats.estdowncap");   
      gridData = new GridData();
      gridData.horizontalIndent = 20;
      label.setLayoutData(gridData);

        SpeedManagerLimitEstimate down_lim = sm.getEstimatedDownloadCapacityBytesPerSec();

        String co_down      = "AutoSpeed Network Download Speed (temp)";
    String co_down_type   = "AutoSpeed Network Download Speed Type (temp)";
        COConfigurationManager.setParameter( co_down, down_lim.getBytesPerSec()/1024 );
        COConfigurationManager.setParameter( co_down_type, limit_to_text.getSettableType( down_lim ));

    final IntParameter max_download = new IntParameter(networkGroup, co_down );
     
    final Label download_bits = new Label(networkGroup, SWT.NULL);
      gridData = new GridData();
      download_bits.setLayoutData(gridData);
      download_bits.setText(getMBitLimit(limit_to_text,(down_lim.getBytesPerSec()/1024)*1024));
     
    final StringListParameter max_download_type =
      new StringListParameter(networkGroup, co_down_type, limit_to_text.getSettableTypes(),limit_to_text.getSettableTypes() );

    max_download_type.addChangeListener(
      new ParameterChangeAdapter()
      {
        public void
        parameterChanged(
          Parameter   p,
          boolean   caused_internally )
        {
          if ( max_download_type.isDisposed()){
         
            return;
          }
         
          float type = limit_to_text.textToType( max_download_type.getValue());
             
          SpeedManagerLimitEstimate existing = sm.getEstimatedDownloadCapacityBytesPerSec();
         
          if ( existing.getEstimateType() != type ){
         
            sm.setEstimatedDownloadCapacityBytesPerSec( existing.getBytesPerSec(), type );
          }
        }
      });
   
    max_download.addChangeListener(
      new ParameterChangeAdapter()
      {
        public void
        parameterChanged(
          Parameter   p,
          boolean   caused_internally )
        {
          if ( max_download.isDisposed()){
         
            return;
          }
                   
          int  value = max_download.getValue() * 1024;
               
          SpeedManagerLimitEstimate existing = sm.getEstimatedDownloadCapacityBytesPerSec();
         
          if ( existing.getBytesPerSec() != value ){
         
            sm.setEstimatedDownloadCapacityBytesPerSec( value, existing.getEstimateType());
          }
        }
      });
   
      label = new Label(networkGroup, SWT.NULL);

        // reset
     
      Label reset_label = new Label(networkGroup, SWT.NULL );
      Messages.setLanguageText(reset_label, CFG_PREFIX + "resetnetwork");

      Button reset_button = new Button(networkGroup, SWT.PUSH);

      Messages.setLanguageText(reset_button, CFG_PREFIX + "reset.button" );

      reset_button.addListener(SWT.Selection,
        new Listener()
      {
            public void
        handleEvent(Event event)
            {
              sm.reset();
            }
        });
       
     sm.addListener(
             new SpeedManagerListener()
             {
               private final SpeedManagerListener  listener = this;
              
               public void
               propertyChanged(
                 final int property
               {
                 Utils.execSWTThread(
                   new Runnable()
                   {
                     public void
                     run()
                     {
                       if ( asn_label.isDisposed()){
                        
                         sm.removeListener( listener );
                        
                       }else{
                        
                         if ( property == SpeedManagerListener.PR_ASN ){
                          
                           asn_label.setText( sm.getASN());
                          
                          }else if ( property == SpeedManagerListener.PR_UP_CAPACITY ){
                            
                            SpeedManagerLimitEstimate limit = sm.getEstimatedUploadCapacityBytesPerSec();
                           
                           up_cap.setText( limit_to_text.getLimitText( limit ));
                            
                           upload_bits.setText(getMBitLimit(limit_to_text, limit.getBytesPerSec()));
                          
                           max_upload.setValue( limit.getBytesPerSec()/1024 );
                          
                           max_upload_type.setValue( limit_to_text.getSettableType( limit ));
                          
                          }else if ( property == SpeedManagerListener.PR_DOWN_CAPACITY ){
                        
                            SpeedManagerLimitEstimate limit = sm.getEstimatedDownloadCapacityBytesPerSec();

                         down_cap.setText( limit_to_text.getLimitText( limit ));
                        
                         download_bits.setText(getMBitLimit(limit_to_text, limit.getBytesPerSec()));
                          
                           max_download.setValue( limit.getBytesPerSec()/1024 );
                          
                           max_download_type.setValue( limit_to_text.getSettableType( limit ));
              
                         }
                       }
                     }
                   });
               }
             });
            
        //Add listeners to disable setting when needed.
               

        //spacer
      
     spacer = new Label(cSection, SWT.NULL);
     gridData = new GridData();
     gridData.horizontalSpan=3;
     spacer.setLayoutData(gridData);
      
    BooleanParameter debug_au = new BooleanParameter(
        cSection, "Auto Upload Speed Debug Enabled",
        CFG_PREFIX + "enabledebug" );
    gridData = new GridData();
    gridData.horizontalSpan = 3;
    debug_au.setLayoutData(gridData)
   
        //spacer
       
        spacer = new Label(cSection, SWT.NULL);
        gridData = new GridData();
        gridData.horizontalSpan=3;
        spacer.setLayoutData(gridData);

        /////////////////////////////////////////
        //Add group to link to Azureus Wiki page.
        /////////////////////////////////////////
        Group azWiki = new Group(cSection, SWT.WRAP);
        gridData = new GridData();
        azWiki.setLayoutData(gridData);
        GridLayout layout = new GridLayout();
        layout.numColumns = 1;
        layout.marginHeight = 1;
        layout.marginWidth = 20;
        azWiki.setLayout(layout);

View Full Code Here

  private void createWindow() {
    this.display = Display.getCurrent();
    this.shell = org.gudy.azureus2.ui.swt.components.shell.ShellFactory.createShell(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.RESIZE);
    Messages.setLanguageText(this.shell,"wizard.multitracker.edit.title");
    Utils.setShellIcon(shell);
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    shell.setLayout(layout);
   
    GridData gridData;
   
    if ( !anonymous ){
     
      Label labelName = new Label(shell,SWT.NULL);
      Messages.setLanguageText(labelName,"wizard.multitracker.edit.name");
     
      textName = new Text(shell,SWT.BORDER);
      textName.setText(currentName);
      gridData = new GridData(GridData.FILL_HORIZONTAL);
      gridData.horizontalSpan = 2;
      textName.setLayoutData(gridData);
      textName.addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent arg0) {
          currentName = textName.getText();
          computeSaveEnable();
        }
      });  
    }
       
    treeGroups = new Tree(shell,SWT.BORDER);
    gridData = new GridData(GridData.FILL_BOTH);
    gridData.horizontalSpan = 3;
    gridData.heightHint = 150;
    treeGroups.setLayoutData(gridData);
   
    treeGroups.addMouseListener(
        new MouseAdapter()
        {
          public void
          mouseDoubleClick(
            MouseEvent arg0 )
          {
            if(treeGroups.getSelectionCount() == 1) {
              TreeItem treeItem = treeGroups.getSelection()[0];
              String type = (String) treeItem.getData("type");
              if(type.equals("tracker")) {
                editTreeItem(treeItem);
              }
            }
          }
        });
       
    Label labelSeparator = new Label(shell,SWT.SEPARATOR | SWT.HORIZONTAL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 3;
    labelSeparator.setLayoutData(gridData);
   
      // button row
   
    Composite cButtons = new Composite(shell, SWT.NONE);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 3;
    cButtons.setLayoutData(gridData);
    GridLayout layoutButtons = new GridLayout();
    layoutButtons.numColumns = 3;
    cButtons.setLayout(layoutButtons);
    Label label = new Label(cButtons,SWT.NULL);
    gridData = new GridData(GridData.FILL_HORIZONTAL );
    label.setLayoutData(gridData);
View Full Code Here

    shell.setText(MessageText.getString("configureWizard.nat.title"));
    Utils.setShellIcon(shell);

    display = shell.getDisplay();
   
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    shell.setLayout(layout);

    Composite panel = new Composite(shell, SWT.NULL);
    GridData gridData = new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.FILL_HORIZONTAL);
    panel.setLayoutData(gridData);
    layout = new GridLayout();
    layout.numColumns = 3;
    panel.setLayout(layout);

    Label label = new Label(panel, SWT.WRAP);
    gridData = new GridData();
View Full Code Here

TOP

Related Classes of org.eclipse.swt.layout.GridLayout

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.