Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.FormData


   *
   */
  public void addFieldDecoration(FieldDecoration decoration, int position,
      boolean showOnFocus) {
    final Label label;
    FormData formData;
    int i = indexForPosition(position);
    if (decDatas[i] == null) {
      formData = createFormDataForIndex(i, decoration.getImage());
      label = new Label(form, SWT.HORIZONTAL | SWT.VERTICAL | SWT.CENTER);
      label.addMouseTrackListener(new MouseTrackListener() {
View Full Code Here


   * A decoration at the specified index has been added. Update the control's
   * attachments if it has not previously been attached on that side or if it
   * was attached to a decoration with a lesser width.
   */
  private void updateControlAttachments(int index, FieldDecorationData decData) {
    FormData formData = (FormData) control.getLayoutData();
    int newWidth = widthOf(decData.decoration.getImage());
    // opposing represents the location of the decoration above or below
    // the one in question.
    int opposing;

View Full Code Here

   */
  private FormData createFormDataForIndex(int index, Image image) {
    Assert.isTrue(index >= 0 && index < DECORATION_SLOTS,
        "Index out of range"); //$NON-NLS-1$

    FormData data = new FormData();
    switch (index) {
    case LEFT_TOP:
      data.left = new FormAttachment(0, 0);
      data.top = new FormAttachment(0, 0);
      break;
View Full Code Here

       
        // Jobname line
        wlName=new Label(shell, SWT.RIGHT);
        wlName.setText("Job entry name ");
        props.setLook(wlName);
        fdlName=new FormData();
        fdlName.left = new FormAttachment(0, 0);
        fdlName.right= new FormAttachment(middle, -margin);
        fdlName.top  = new FormAttachment(0, margin);
        wlName.setLayoutData(fdlName);
        wName=new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
        props.setLook(wName);
        wName.addModifyListener(lsMod);
        fdName=new FormData();
        fdName.left = new FormAttachment(middle, 0);
        fdName.top  = new FormAttachment(0, margin);
        fdName.right= new FormAttachment(100, 0);
        wName.setLayoutData(fdName);
       
        // AccessKey line
        wlAccessKey=new Label(shell, SWT.RIGHT);
        wlAccessKey.setText("Access Key");
        props.setLook(wlAccessKey);
        fdlAccessKey=new FormData();
        fdlAccessKey.left = new FormAttachment(0, 0);
        fdlAccessKey.top  = new FormAttachment(wName, margin);
        fdlAccessKey.right= new FormAttachment(middle, -margin);
        wlAccessKey.setLayoutData(fdlAccessKey);
        wAccessKey=new TextVar(jobMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
        props.setLook(wAccessKey);
        wAccessKey.addModifyListener(lsMod);
        fdAccessKey=new FormData();
        fdAccessKey.left = new FormAttachment(middle, 0);
        fdAccessKey.top  = new FormAttachment(wName, margin);
        fdAccessKey.right= new FormAttachment(100, 0);
        wAccessKey.setLayoutData(fdAccessKey);       

    // PrivateKey line
    wlPrivateKey=new Label(shell, SWT.RIGHT);
    wlPrivateKey.setText("Private Key");
     props.setLook(wlPrivateKey);
    fdlPrivateKey=new FormData();
    fdlPrivateKey.left = new FormAttachment(0, 0);
    fdlPrivateKey.top  = new FormAttachment(wAccessKey, margin);
    fdlPrivateKey.right= new FormAttachment(middle, -margin);
    wlPrivateKey.setLayoutData(fdlPrivateKey);
    wPrivateKey=new TextVar(jobMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
     props.setLook(wPrivateKey);
    wPrivateKey.addModifyListener(lsMod);
    fdPrivateKey=new FormData();
    fdPrivateKey.left = new FormAttachment(middle, 0);
    fdPrivateKey.top  = new FormAttachment(wAccessKey, margin);
    fdPrivateKey.right= new FormAttachment(100, 0);
    wPrivateKey.setLayoutData(fdPrivateKey);

    // S3Bucket line
    wlS3Bucket=new Label(shell, SWT.RIGHT);
    wlS3Bucket.setText("S3Bucket");
     props.setLook(wlS3Bucket);
    fdlS3Bucket=new FormData();
    fdlS3Bucket.left = new FormAttachment(0, 0);
    fdlS3Bucket.top  = new FormAttachment(wPrivateKey, margin);
    fdlS3Bucket.right= new FormAttachment(middle, -margin);
    wlS3Bucket.setLayoutData(fdlS3Bucket);
    wS3Bucket=new TextVar(jobMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
     props.setLook(wS3Bucket);
    wS3Bucket.addModifyListener(lsMod);
    fdS3Bucket=new FormData();
    fdS3Bucket.left = new FormAttachment(middle, 0);
    fdS3Bucket.top  = new FormAttachment(wPrivateKey, margin);
    fdS3Bucket.right= new FormAttachment(100, 0);
    wS3Bucket.setLayoutData(fdS3Bucket);

    // Filename line
    wlFilename=new Label(shell, SWT.RIGHT);
    wlFilename.setText("Filename");
     props.setLook(wlFilename);
    fdlFilename=new FormData();
    fdlFilename.left = new FormAttachment(0, 0);
    fdlFilename.top  = new FormAttachment(wS3Bucket, margin);
    fdlFilename.right= new FormAttachment(middle, -margin);
    wlFilename.setLayoutData(fdlFilename);
    wFilename=new TextVar(jobMeta, shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
     props.setLook(wFilename);
    wFilename.addModifyListener(lsMod);
    fdFilename=new FormData();
    fdFilename.left = new FormAttachment(middle, 0);
    fdFilename.top  = new FormAttachment(wS3Bucket, margin);
    fdFilename.right= new FormAttachment(100, 0);
    wFilename.setLayoutData(fdFilename);
   
View Full Code Here

    formLayout.marginHeight = 5;
    formLayout.marginWidth = 5;
    composite.setLayout(formLayout);

    Label label = new Label(composite, SWT.NONE);
    FormData data = new FormData();
    data.top = new FormAttachment(0, 0);
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    label.setLayoutData(data);

    toolBar = new ToolBar(composite, SWT.BORDER | SWT.FLAT | SWT.VERTICAL);
   

    data = new FormData();
    data.top = new FormAttachment(label, 0);
    data.left = new FormAttachment(0, 0);
    data.bottom = new FormAttachment(100, 0);
    // data.height = 250;
    // data.width = 50;
    toolBar.setLayoutData(data);

    Composite composite1 = new Composite(composite, SWT.BORDER);
    data = new FormData();
    data.top = new FormAttachment(label, 0);
    data.left = new FormAttachment(toolBar, 0, SWT.DEFAULT);
    data.right = new FormAttachment(100, 0);
    data.bottom = new FormAttachment(100, 0);
    composite1.setLayoutData(data);
View Full Code Here

            tb.setViewport(graph.getViewport());
            tb.setSource(graph.getContents());
        }

        private void createZoomableCanvas(Composite parent) {
            FormData data = new FormData();
            data.top = new FormAttachment(100, -100);
            data.left = new FormAttachment(100, -100);
            data.right = new FormAttachment(100, 0);
            data.bottom = new FormAttachment(100, 0);
View Full Code Here

            tb.setBorder(new LineBorder(1));
            thumbnail.setContents(tb);
        }

        private void createContents(Control control) {
            FormData data = new FormData();
            data.top = new FormAttachment(0, 0);
            data.left = new FormAttachment(0, 0);
            data.right = new FormAttachment(100, 0);
            data.bottom = new FormAttachment(100, 0);
            control.setParent(this);
View Full Code Here

  private void createPropertiesPage(Composite parent, final TabbedPropertySheetPage atabbedPropertySheetPage) {
    super.createControls(parent, atabbedPropertySheetPage);
    Composite composite = getWidgetFactory().createFlatFormComposite(parent);
    propertySheetPage = new HDFSPropertySheetPage();
    propertySheetPage.createControl(composite);
    FormData data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(0, 0);
    data.bottom = new FormAttachment(100, 0);
    propertySheetPage.getControl().setLayoutData(data);
View Full Code Here

        layout.marginHeight = 0;
        layout.marginWidth = 0;
        layout.spacing = 0;
        parent.setLayout(layout);
       
        FormData dLabel = new FormData(); // bind to left & text
        dLabel.left = new FormAttachment(0,5);
        dLabel.top = new FormAttachment(attributeCombo,2);
        dLabel.right = new FormAttachment(100,-5);
        featuresSelected.setLayoutData(dLabel);
       
        FormData dCombo = new FormData(); // bind to label and text
        dCombo.left = new FormAttachment(0,5);
        dCombo.top = new FormAttachment(0);
        dCombo.right = new FormAttachment(30, -5);
        attributeCombo.setLayoutData(dCombo);
       
        FormData dText = new FormData(); // bind to label and text
        dText.left = new FormAttachment(attributeCombo);
        dText.top = new FormAttachment(0);
        dText.right = new FormAttachment(95,-5);
        searchWidget.setLayoutData(dText);
       
        FormData dCheck = new FormData(); // bind to top, label, bbox
        dCheck.top = new FormAttachment(2);
        dCheck.left = new FormAttachment(searchWidget, 5);
        dCheck.right = new FormAttachment( 100,-5);
        selectAllCheck.setLayoutData(dCheck);
       
        FormData dContents = new FormData(100, 100); // text & bottom
        dContents.right = new FormAttachment(100); // bind to right of form
        dContents.left = new FormAttachment(0); // bind to left of form
        dContents.top = new FormAttachment(featuresSelected, 2); // attach with 2 pixel offset
        dContents.bottom = new FormAttachment(100); // bind to bottom of form       
        table.getControl().setLayoutData(dContents);
View Full Code Here

        layout.marginHeight = 0;
        layout.marginWidth = 0;
        layout.spacing = 0;
        aParent.setLayout(layout);

        FormData dLabel = new FormData(); // bind to left & text
        dLabel.left = new FormAttachment(0);
        dLabel.top = new FormAttachment(text, 5, SWT.CENTER);
        label.setLayoutData(dLabel);

        FormData dText = new FormData(); // bind to top, label, bbox
        dText.top = new FormAttachment(1);
        dText.left = new FormAttachment(label, 5);
        dText.right = new FormAttachment(bbox, -5);
        text.setLayoutData(dText);

        FormData dBbox = new FormData(); // text & right
        dBbox.right = new FormAttachment(100);
        dBbox.top = new FormAttachment(text, 0, SWT.CENTER);
        bbox.setLayoutData(dBbox);

        FormData dsashForm = new FormData(100, 100); // text & bottom
        dsashForm.right = new FormAttachment(100); // bind to right of form
        dsashForm.left = new FormAttachment(0); // bind to left of form
        dsashForm.top = new FormAttachment(text, 2); // attach with 5 pixel offset
        dsashForm.bottom = new FormAttachment(100); // bind to bottom of form
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.