Examples of FormAttachment


Examples of org.eclipse.swt.layout.FormAttachment

          .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
    messageImageLabel = new Label(parent, SWT.CENTER);
    messageImageLabel.setBackground(background);
    // Message label @ bottom, center
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.