Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.FormData


    close.setCursor(composite.getDisplay().getSystemCursor(SWT.CURSOR_HAND));
    close.addListener(SWT.MouseUp, new Listener() {
      public void handleEvent(Event arg0) {
        COConfigurationManager.setParameter("subscriptions.view.showhelp", false);
        composite.setVisible(false);
        FormData data = (FormData) view.getComposite().getLayoutData();
        data.bottom = new FormAttachment(100,0);
        viewComposite.layout(true);
      }
    });
   
    FormLayout layout = new FormLayout();
    composite.setLayout(layout);
   
    FormData data;
   
    data = new FormData();
    data.left = new FormAttachment(0,15);
    data.top = new FormAttachment(0,20);
    data.bottom = new FormAttachment(postText,-5);
    preText.setLayoutData(data);
   
    data = new FormData();
    data.left = new FormAttachment(preText,5);
    data.top = new FormAttachment(preText,0,SWT.CENTER);
    image.setLayoutData(data);
   
    data = new FormData();
    data.left = new FormAttachment(preText,0,SWT.LEFT);
    //data.top = new FormAttachment(preText,5);
    data.bottom = new FormAttachment(100,-20);
    postText.setLayoutData(data);
   
    data = new FormData();
    data.right = new FormAttachment(100,-10);
    data.top = new FormAttachment(0,10);   
    close.setLayoutData(data);
   
    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(composite,0);   
    view.getComposite().setLayoutData(data);
   
    data = new FormData();
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    data.bottom = new FormAttachment(100,0);   
    composite.setLayoutData(data);
   
View Full Code Here


    Composite footer = new Composite(shell, SWT.NONE);
   
    FormLayout layout = new FormLayout();
    shell.setLayout(layout);
   
    FormData data;
   
    data = new FormData();
    data.top = new FormAttachment(0,0);
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    //data.height = 50;
    header.setLayoutData(data);
   
    data = new FormData();
    data.top = new FormAttachment(header,0);
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    topSeparator.setLayoutData(data);
   
    data = new FormData();
    data.top = new FormAttachment(topSeparator,0);
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    data.bottom = new FormAttachment(bottomSeparator,0);
    main.setLayoutData(data);
   
    data = new FormData();
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    data.bottom = new FormAttachment(footer,0);
    bottomSeparator.setLayoutData(data);
   
    data = new FormData();
    data.bottom = new FormAttachment(100,0);
    data.left = new FormAttachment(0,0);
    data.right = new FormAttachment(100,0);
    footer.setLayoutData(data);
   
View Full Code Here

    layout.marginHeight = 5;
    layout.marginWidth = 50;
    layout.spacing = 5;
   
    main.setLayout(layout);
    FormData data;
   
    data = new FormData();
    data.top = new FormAttachment(0, 20);
    data.left = new FormAttachment(0);
    image_area.setLayoutData(data);
   
    data = new FormData();
    data.top = new FormAttachment(image_area,10);
    data.left = new FormAttachment(0);
    data.right = new FormAttachment(100);
    text1.setLayoutData(data);
   
    data = new FormData();
    data.top = new FormAttachment(text1, 10 );
    data.left = new FormAttachment(0);
    data.right = new FormAttachment(100);
    text2.setLayoutData(data);
   
    data = new FormData();
    data.top = new FormAttachment(text2, 10 );
    data.left = new FormAttachment(0);
    data.right = new FormAttachment(100);
    noSpaceWarning.setLayoutData(data);
   
    data = new FormData();
    data.top = new FormAttachment(noSpaceWarning, 10 );
    data.left = new FormAttachment(0);
    link.setLayoutData(data);
  }
View Full Code Here

    layout.marginHeight = 5;
    layout.marginWidth = 5;
    layout.spacing = 5;
   
    footer.setLayout(layout);
    FormData data;
     
    data = new FormData();
    data.left = new FormAttachment(0,45);
    data.right = new FormAttachment(turnOnButton);
    dont_ask_again.setLayoutData(data);

    data = new FormData();
    data.right = new FormAttachment(100);
    data.width = 100;
    cancelButton.setLayoutData(data);
   
    data = new FormData();
    data.right = new FormAttachment( cancelButton );
    data.width = 100;
    turnOnButton.setLayoutData(data);
   
   
View Full Code Here

          boolean changed = visible != control.isVisible()
              || (visible ? 1 : 0) != isVisible;

          Object ld = control.getLayoutData();
          if (ld instanceof FormData) {
            FormData fd = (FormData) ld;
            if (!visible) {
              if (fd.width > 0 && fd.height > 0) {
                control.setData("oldSize", new Point(fd.width, fd.height));
                changed = true;
              }
              fd.width = 0;
              fd.height = 0;
            } else {
              Object oldSize = control.getData("oldSize");
              Point oldSizePoint = (oldSize instanceof Point) ? (Point) oldSize
                  : new Point(SWT.DEFAULT, SWT.DEFAULT);
              if (fd.width <= 0) {
                changed = true;
                fd.width = oldSizePoint.x;
              }
              if (fd.height <= 0) {
                changed = true;
                fd.height = oldSizePoint.y;
              }
            }
            if (changed) {
              control.setLayoutData(fd);
              control.getParent().layout(true);
              Utils.relayout(control);
            }
          } else if (ld == null && !visible) {
            FormData fd = new FormData();
            fd.width = 0;
            fd.height = 0;
            control.setLayoutData(fd);
          }
          if (changed || true) { // For some reason this is required even when !changed (on Windows)
View Full Code Here

    Object data = controlToLayout.getLayoutData();
    if (data != null && !(data instanceof FormData)) {
      return;
    }
    FormData oldFormData = (FormData) controlToLayout.getLayoutData();
    if (oldFormData == null) {
      oldFormData = new FormData();
    }

    FormData newFormData = new FormData(oldFormData.width, oldFormData.height);

    String templateID = properties.getStringValue(sConfigID
        + ".attach.template");
    if (templateID == null) {
      //templateID = skinObject.getSkinObjectID();
View Full Code Here

            return;
          }

          Rectangle parentArea = sash.getParent().getClientArea();

          FormData formData = (FormData) sash.getLayoutData();
          formData.left = new FormAttachment(e.x * 100 / parentArea.width);
          sash.getParent().layout();
        }
      });
    } else {
View Full Code Here

          if (FASTDRAG && e.detail == SWT.DRAG) {
            return;
          }

          Rectangle area = parentComposite.getBounds();
          FormData aboveData = (FormData) above.getLayoutData();
          FormData belowData = (FormData) below.getLayoutData();
          if (isVertical) {
            // Need to figure out if we have to use border width elsewhere
            // in calculations (probably)
            aboveData.width = e.x - above.getBorderWidth();
            if (aboveData.width < aboveMin) {
View Full Code Here

      }
    } else {
      newAboveSize = 0;
    }

    FormData aboveData = (FormData) above.getLayoutData();
    if (aboveData == null) {
      aboveData = Utils.getFilledFormData();
      above.setLayoutData(aboveData);
    }
    if (isVertical) {
View Full Code Here

   *
   */
  protected void setPercent(double pctAbove, Control sash, Composite above,
      Composite below, boolean bVertical, Control parentComposite,
      int minAbove, int belowMin) {
    FormData aboveData = (FormData) above.getLayoutData();
    if (aboveData == null) {
      return;
    }
    boolean layoutNeeded = false;
    if (bVertical) {
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.