Examples of GridData


Examples of org.eclipse.swt.layout.GridData

  }

 

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

    // main 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);
   
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

    GridLayout layout = new GridLayout();
    layout.numColumns = 1;
    rootPanel.setLayout(layout);

    Composite panel = new Composite(rootPanel, 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);

    //Line :
    // Multi-Tracker Configuration
   
    final Label labelTitle = new Label(panel,SWT.NULL);
    Messages.setLanguageText(labelTitle, "wizard.multitracker.configuration");
    gridData = new GridData();
    gridData.horizontalSpan = 3;
    labelTitle.setLayoutData(gridData)
   
    configList = new Combo(panel,SWT.READ_ONLY);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 3;
    configList.setLayoutData(gridData);
    configList.addListener(SWT.Selection,new Listener() {
      public void handleEvent(Event e) {               
        updateTrackers();
        refreshDetails();
      }
    });
          
    btnNew = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnNew, "wizard.multitracker.new");
    gridData = new GridData();
    gridData.widthHint = 100;
    btnNew.setLayoutData(gridData);
    btnNew.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        List group = new ArrayList();
        List tracker = new ArrayList();
        tracker.add(((NewTorrentWizard)wizard).trackerURL);
        group.add(tracker);
        new MultiTrackerEditor(null,group,MultiTrackerPanel.this);
      }
    });
   
    btnEdit = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnEdit, "wizard.multitracker.edit");
    gridData = new GridData();
    gridData.widthHint = 100;
    btnEdit.setLayoutData(gridData);
    btnEdit.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        int selection = configList.getSelectionIndex();
        String selected = configList.getItem(selection);
        Map multiTrackers = TrackersUtil.getInstance().getMultiTrackers();
        new MultiTrackerEditor(selected,(List)multiTrackers.get(selected),MultiTrackerPanel.this);
      }
    });
   
    btnDelete = new Button(panel, SWT.PUSH);  
    Messages.setLanguageText(btnDelete, "wizard.multitracker.delete");
    gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
    gridData.widthHint = 100;   
    btnDelete.setLayoutData(gridData);
    btnDelete.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        int selection = configList.getSelectionIndex();
        String selected = configList.getItem(selection);
        TrackersUtil.getInstance().removeMultiTracker(selected);
        refreshList("");
        refreshDetails();
        setEditDeleteEnable();
      }
    });
    final Label labelSeparator = new Label(panel,SWT.SEPARATOR | SWT.HORIZONTAL);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 3;
    labelSeparator.setLayoutData(gridData);
   
    configDetails = new Tree(panel,SWT.BORDER);
    gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.heightHint = 150;
    gridData.horizontalSpan = 3;
    configDetails.setLayoutData(gridData);   
   
    refreshList(((NewTorrentWizard)wizard).multiTrackerConfig);
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

    errorColor = Colors.colorError;

    /*
     * Give this Composite some margin and spacing
     */
    setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
    GridLayout gLayout = new GridLayout(2, false);
    gLayout.marginWidth = 25;
    gLayout.marginTop =15;
    gLayout.marginBottom=10;
    setLayout(gLayout);
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

   * @param pReport
   */
  private void createControls(IProgressReport pReport) {

    imageLabel = new Label(this, SWT.NONE);
    imageLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.TOP, false, false,1,3));

   
    /*
     * Creates the main panel
     */
    progressPanel = new Composite(this, SWT.NONE);
    progressPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    GridLayout rightLayout = new GridLayout(4, false);
    rightLayout.marginHeight = 0;
    rightLayout.marginWidth = 0;
    progressPanel.setLayout(rightLayout);

    /*
     * Creates all the controls
     */

    nameLabel = new Label(progressPanel, SWT.WRAP);
    nameLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
        false, 4, 1));

    pBar = new AZProgressBar(progressPanel, pReport.isIndeterminate());
    pBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

    actionLabel_cancel = new Label(progressPanel, SWT.NONE);
    actionLabel_cancel.setLayoutData(new GridData(SWT.END, SWT.CENTER, false,
        false));

    actionLabel_remove = new Label(progressPanel, SWT.NONE);
    actionLabel_remove.setLayoutData(new GridData(SWT.END, SWT.CENTER, false,
        false));

    actionLabel_retry = new Label(progressPanel, SWT.NONE);
    actionLabel_retry.setLayoutData(new GridData(SWT.END, SWT.CENTER, false,
        false));

    statusLabel = new Label(progressPanel, SWT.NONE);
    statusLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false,
        2, 1));

    /*
     * Creates the detail section
     */
 
View Full Code Here

Examples of org.eclipse.swt.layout.GridData

  /**
   * Below the panel, taking up the entire width of the window, is the detail section
   */
  private void createDetailSection(IProgressReport pReport) {
    Label separator = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
    separator.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));

    detailSection = new TwistieSection(this, TwistieLabel.NONE);
    detailSection.setTitle(MessageText.getString("Progress.reporting.action.label.detail"));
    Composite sectionContent = detailSection.getContent();

    detailSectionData = new GridData(SWT.FILL, SWT.FILL, true, true);
    detailSection.setLayoutData(detailSectionData);

    GridLayout sectionLayout = new GridLayout();
    sectionLayout.marginHeight = 0;
    sectionLayout.marginWidth = 0;
    sectionContent.setLayout(sectionLayout);
    detailSection.setEnabled(false);

    detailListWidget = new StyledText(sectionContent, SWT.BORDER | SWT.V_SCROLL
        | SWT.WRAP);
    detailListWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    /*
     * Add a default message instead of an empty box if there is no history;
     * remove this later when a real detail message arrive
     */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.