Eclipse Platform
2.0

org.eclipse.swt.layout
Class FormData

java.lang.Object
  |
  +--org.eclipse.swt.layout.FormData

public final class FormData
extends Object

Instances of this class are used to define the attachments of a control in a FormLayout.

To set a FormData object into a control, you use the setLayoutData () method. To define attachments for the FormData, set the fields directly, like this:

 		FormData data = new FormData();
 		data.left = new FormAttachment(0,5);
 		data.right = new FormAttachment(100,-5);
 		button.setLayoutData(formData);
 

FormData contains the FormAttachments for each edge of the control that the FormLayout uses to determine the size and position of the control. FormData objects also allow you to set the width and height of controls within a FormLayout.

Since:
2.0
See Also:
FormLayout, FormAttachment

Field Summary
 FormAttachment bottom
          bottom specifies the attachment of the bottom of the control.
 int height
          height specifies the desired height in pixels
 FormAttachment left
          left specifies the attachment of the left side of the control.
 FormAttachment right
          right specifies the attachment of the right side of the control.
 FormAttachment top
          top specifies the attachment of the top of the control.
 int width
          width specifies the desired width in pixels
 
Constructor Summary
FormData()
           
FormData(int width, int height)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

height

public int height
height specifies the desired height in pixels


width

public int width
width specifies the desired width in pixels


left

public FormAttachment left
left specifies the attachment of the left side of the control.


right

public FormAttachment right
right specifies the attachment of the right side of the control.


top

public FormAttachment top
top specifies the attachment of the top of the control.


bottom

public FormAttachment bottom
bottom specifies the attachment of the bottom of the control.

Constructor Detail

FormData

public FormData()

FormData

public FormData(int width,
                int height)

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.