Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.FormData


        final Composite composite = parent;

        final String resourceString4 = "External includes file";
        final Label label = new Label(composite, SWT.NONE);
        {
            final FormData fd_label = new FormData();
            fd_label.top = new FormAttachment(0, 237);
            fd_label.left = new FormAttachment(0, 5);
            label.setLayoutData(fd_label);
        }
        label.setBackground(SWTResourceManager.getColor(255, 255, 183));
        label.setText(resourceString4 + ":");
        externalIncludes = new Text(composite, SWT.BORDER);
        {
            final FormData fd_externalIncludes = new FormData();
            fd_externalIncludes.right = new FormAttachment(0, 477);
            fd_externalIncludes.top = new FormAttachment(0, 232);
            fd_externalIncludes.left = new FormAttachment(0, 141);
            externalIncludes.setLayoutData(fd_externalIncludes);
        }
        externalIncludes.setToolTipText("enter a list of folders");
        externalIncludes.setText(info.getExternalIncludesFile());
        externalIncludes.addModifyListener(new ModifyListener() {
            @Override
            public void modifyText(final ModifyEvent e) {
                info.setExternalIncludesFile(externalIncludes.getText());
            }
        });
        externalIncludesBrowse = new Button(composite, SWT.NONE);
        {
            final FormData fd_externalIncludesBrowse = new FormData();
            fd_externalIncludesBrowse.top = new FormAttachment(0, 233);
            fd_externalIncludesBrowse.left = new FormAttachment(0, 482);
            externalIncludesBrowse.setLayoutData(fd_externalIncludesBrowse);
        }
        externalIncludesBrowse.setText("Browse...");
View Full Code Here


        composite.setLayout(new FormLayout());

        final Label outLabel = new Label(composite, SWT.NONE);
        outLabel.setAlignment(SWT.RIGHT);
        FormData fd_outLabel;
        {
            fd_outLabel = new FormData();
            fd_outLabel.top = new FormAttachment(0, 28);
            fd_outLabel.left = new FormAttachment(0, 5);
            outLabel.setLayoutData(fd_outLabel);
        }
        final String resourceString = ErlideUIPlugin
                .getResourceString("wizards.labels.buildoutput");
        outLabel.setText(resourceString + ":");
        output = new Text(composite, SWT.BORDER);
        fd_outLabel.right = new FormAttachment(output, -10);
        {
            final FormData fd_output = new FormData();
            fd_output.top = new FormAttachment(0, 23);
            fd_output.right = new FormAttachment(0, 592);
            fd_output.left = new FormAttachment(0, 141);
            output.setLayoutData(fd_output);
        }
        output.setText(info.getOutputDir().toString());
        output.setEnabled(false);
        output.addModifyListener(new ModifyListener() {
            @Override
            public void modifyText(final ModifyEvent e) {
                info.setOutputDir(new Path(output.getText()));
            }
        });

        final Label l1 = new Label(composite, SWT.NONE);
        l1.setAlignment(SWT.RIGHT);
        FormData fd_l1;
        {
            fd_l1 = new FormData();
            fd_l1.top = new FormAttachment(0, 58);
            fd_l1.left = new FormAttachment(0, 5);
            l1.setLayoutData(fd_l1);
        }
        final String resourceString2 = ErlideUIPlugin
                .getResourceString("wizards.labels.source");
        l1.setText(resourceString2 + ":");
        source = new Text(composite, SWT.BORDER);
        fd_l1.right = new FormAttachment(source, -10);
        {
            final FormData fd_source = new FormData();
            fd_source.top = new FormAttachment(0, 53);
            fd_source.right = new FormAttachment(0, 592);
            fd_source.left = new FormAttachment(0, 141);
            source.setLayoutData(fd_source);
        }
        source.setToolTipText("enter a list of folders, using / in paths and ; as list separator");
        source.setText(PathSerializer.packList(info.getSourceDirs()));
        source.setEnabled(false);
        source.addModifyListener(new ModifyListener() {
            @Override
            public void modifyText(final ModifyEvent e) {
                info.setSourceDirs(PathSerializer.unpackList(source.getText()));
            }
        });

        final Label includesLabel = new Label(composite, SWT.NONE);
        includesLabel.setAlignment(SWT.RIGHT);
        FormData fd_includesLabel;
        {
            fd_includesLabel = new FormData();
            fd_includesLabel.top = new FormAttachment(0, 88);
            fd_includesLabel.left = new FormAttachment(0, 5);
            includesLabel.setLayoutData(fd_includesLabel);
        }
        final String resourceString3 = ErlideUIPlugin
                .getResourceString("wizards.labels.include");
        includesLabel.setText(resourceString3 + ":");
        include = new Text(composite, SWT.BORDER);
        fd_includesLabel.right = new FormAttachment(include, -10);
        {
            final FormData fd_include = new FormData();
            fd_include.top = new FormAttachment(0, 83);
            fd_include.right = new FormAttachment(0, 592);
            fd_include.left = new FormAttachment(0, 141);
            include.setLayoutData(fd_include);
        }
        include.setToolTipText("enter a list of folders, using / in paths and ; as list separator");
        include.setText(PathSerializer.packList(info.getIncludeDirs()));
        include.setEnabled(false);
        include.addModifyListener(new ModifyListener() {
            @Override
            public void modifyText(final ModifyEvent e) {
                info.setIncludeDirs(PathSerializer.unpackList(include.getText()));
            }
        });

        final Label lblTestSources = new Label(composite, SWT.NONE);
        lblTestSources.setEnabled(false);
        lblTestSources.setAlignment(SWT.RIGHT);
        FormData fd_lblTestSources;
        {
            fd_lblTestSources = new FormData();
            fd_lblTestSources.top = new FormAttachment(0, 118);
            fd_lblTestSources.left = new FormAttachment(0, 5);
            lblTestSources.setLayoutData(fd_lblTestSources);
        }
        final String resourceString4 = ErlideUIPlugin
                .getResourceString("wizards.labels.testsources");
        lblTestSources.setText(resourceString4 + ":");

        test = new Text(composite, SWT.BORDER);
        fd_lblTestSources.right = new FormAttachment(test, -10);
        test.setEnabled(false);
        {
            final FormData fd_test = new FormData();
            fd_test.top = new FormAttachment(0, 113);
            fd_test.right = new FormAttachment(0, 592);
            fd_test.left = new FormAttachment(0, 141);
            test.setLayoutData(fd_test);
        }
View Full Code Here

      titleImageLabel.setImage(JFaceResources
          .getImage(DLG_IMG_TITLE_BANNER));
    else
      titleImageLabel.setImage(titleAreaImage);

    FormData imageData = new FormData();
    imageData.top = new FormAttachment(0, 0);
    // Note: do not use horizontalSpacing on the right as that would be a
    // regression from
    // the R2.x style where there was no margin on the right and images are
    // flush to the right
    // hand side. see reopened comments in 41172
    imageData.right = new FormAttachment(100, 0); // horizontalSpacing
    titleImageLabel.setLayoutData(imageData);
    // Title label @ top, left
    titleLabel = new Label(parent, SWT.LEFT);
    JFaceColors.setColors(titleLabel, foreground, background);
    titleLabel.setFont(JFaceResources.getBannerFont());
    titleLabel.setText(" ");//$NON-NLS-1$
    FormData titleData = new FormData();
    titleData.top = new FormAttachment(0, verticalSpacing);
    titleData.right = new FormAttachment(titleImageLabel);
    titleData.left = new FormAttachment(0, horizontalSpacing);
    titleLabel.setLayoutData(titleData);
    // Message image @ bottom, left
View Full Code Here

   * @param horizontalSpacing
   *            int The spacing between widgets on the horizontal axis.
   */
  private void setLayoutsForNormalMessage(int verticalSpacing,
      int horizontalSpacing) {
    FormData messageImageData = new FormData();
    messageImageData.top = new FormAttachment(titleLabel, verticalSpacing);
    messageImageData.left = new FormAttachment(0, H_GAP_IMAGE);
    messageImageLabel.setLayoutData(messageImageData);
    FormData messageLabelData = new FormData();
    messageLabelData.top = new FormAttachment(titleLabel, verticalSpacing);
    messageLabelData.right = new FormAttachment(titleImageLabel);
    messageLabelData.left = new FormAttachment(messageImageLabel,
        horizontalSpacing);
    messageLabelData.height = messageLabelHeight;
    if (titleImageLargest)
      messageLabelData.bottom = new FormAttachment(titleImageLabel, 0,
          SWT.BOTTOM);
    messageLabel.setLayoutData(messageLabelData);
    FormData fillerData = new FormData();
    fillerData.left = new FormAttachment(0, horizontalSpacing);
    fillerData.top = new FormAttachment(messageImageLabel, 0);
    fillerData.bottom = new FormAttachment(messageLabel, 0, SWT.BOTTOM);
    bottomFillerLabel.setLayoutData(fillerData);
    FormData data = new FormData();
    data.top = new FormAttachment(messageImageLabel, 0, SWT.TOP);
    data.left = new FormAttachment(0, 0);
    data.bottom = new FormAttachment(messageImageLabel, 0, SWT.BOTTOM);
    data.right = new FormAttachment(messageImageLabel, 0);
    leftFillerLabel.setLayoutData(data);
View Full Code Here

       * Note that we do not use horizontalSpacing here as when the
       * background of the messages changes there will be gaps between the
       * icon label and the message that are the background color of the
       * shell. We add a leading space elsewhere to compendate for this.
       */
      FormData data = new FormData();
      data.left = new FormAttachment(0, H_GAP_IMAGE);
      data.top = new FormAttachment(titleLabel, verticalSpacing);
      messageImageLabel.setLayoutData(data);
      data = new FormData();
      data.top = new FormAttachment(messageImageLabel, 0);
      data.left = new FormAttachment(0, 0);
      data.bottom = new FormAttachment(messageLabel, 0, SWT.BOTTOM);
      data.right = new FormAttachment(messageImageLabel, 0, SWT.RIGHT);
      bottomFillerLabel.setLayoutData(data);
      data = new FormData();
      data.top = new FormAttachment(messageImageLabel, 0, SWT.TOP);
      data.left = new FormAttachment(0, 0);
      data.bottom = new FormAttachment(messageImageLabel, 0, SWT.BOTTOM);
      data.right = new FormAttachment(messageImageLabel, 0);
      leftFillerLabel.setLayoutData(data);
      FormData messageLabelData = new FormData();
      messageLabelData.top = new FormAttachment(titleLabel,
          verticalSpacing);
      messageLabelData.right = new FormAttachment(titleImageLabel);
      messageLabelData.left = new FormAttachment(messageImageLabel, 0);
      messageLabelData.height = messageLabelHeight;
View Full Code Here

   * control.
   *
   * @param top
   */
  private void resetWorkAreaAttachments(Control top) {
    FormData childData = new FormData();
    childData.top = new FormAttachment(top);
    childData.right = new FormAttachment(100, 0);
    childData.left = new FormAttachment(0, 0);
    childData.bottom = new FormAttachment(100, 0);
    workArea.setLayoutData(childData);
View Full Code Here

    layout.marginHeight = 0;
    layout.marginWidth = 0;
    layout.horizontalSpacing = 0;
    titleComposite.setLayout(layout);
   
    FormData titleFormData = new FormData();
       titleFormData.top = new FormAttachment(0,0);
      titleFormData.left = new FormAttachment(0,0);
      titleFormData.right = new FormAttachment(100,0);
      titleFormData.bottom = new FormAttachment(100,0);
   
View Full Code Here

   * Create the layout data for the message area.
   *
   * @return FormData for the message area.
   */
  private FormData createMessageAreaData() {
    FormData messageData = new FormData();
    messageData.top = new FormAttachment(0);
    messageData.bottom = new FormAttachment(100);
    messageData.right = new FormAttachment(100);
    messageData.left = new FormAttachment(0);
    return messageData;
View Full Code Here

   * and widths.
   *
   * @param button
   */
  protected void setButtonLayoutFormData(Button button) {
    FormData data = new FormData();
    int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
    Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
    data.width = Math.max(widthHint, minSize.x);
    button.setLayoutData(data);
  }
View Full Code Here

    addControlListeners();
    form.setTabList(new Control[] { control });

    // Set up the initial layout data.
    FormData data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.top = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    data.bottom = new FormAttachment(100, 0);
    control.setLayoutData(data);
View Full Code Here

TOP

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

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.