FormData

Instances of this class are used to define the attachments of a control in a <code>FormLayout</code>. <p> To set a <code>FormData</code> object into a control, you use the <code>setLayoutData ()</code> method. To define attachments for the <code>FormData</code>, set the fields directly, like this: <pre> FormData data = new FormData(); data.left = new FormAttachment(0,5); data.right = new FormAttachment(100,-5); button.setLayoutData(formData); </pre> </p> <p> <code>FormData</code> contains the <code>FormAttachments</code> for each edge of the control that the <code>FormLayout</code> uses to determine the size and position of the control. <code>FormData</code> objects also allow you to set the width and height of controls within a <code>FormLayout</code>. </p>

@see FormLayout @see FormAttachment @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

@since 2.0

Constructors

this
this()

Constructs a new instance of FormData using default values.

this
this(int width, int height)

Constructs a new instance of FormData according to the parameters. A value of SWT.DEFAULT indicates that no minimum width or no minimum height is specified.

Members

Functions

computeSize
void computeSize(Control control, int wHint, int hHint, bool flushCache_)
Undocumented in source. Be warned that the author may not have intended to support it.
flushCache
void flushCache()
Undocumented in source. Be warned that the author may not have intended to support it.
getBottomAttachment
FormAttachment getBottomAttachment(Control control, int spacing, bool flushCache)
Undocumented in source. Be warned that the author may not have intended to support it.
getHeight
int getHeight(Control control, bool flushCache)
Undocumented in source. Be warned that the author may not have intended to support it.
getLeftAttachment
FormAttachment getLeftAttachment(Control control, int spacing, bool flushCache)
Undocumented in source. Be warned that the author may not have intended to support it.
getName
String getName()
Undocumented in source. Be warned that the author may not have intended to support it.
getRightAttachment
FormAttachment getRightAttachment(Control control, int spacing, bool flushCache)
Undocumented in source. Be warned that the author may not have intended to support it.
getTopAttachment
FormAttachment getTopAttachment(Control control, int spacing, bool flushCache)
Undocumented in source. Be warned that the author may not have intended to support it.
getWidth
int getWidth(Control control, bool flushCache)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
String toString()

Returns a string containing a concise, human-readable description of the receiver.

Variables

bottom
FormAttachment bottom;

bottom specifies the attachment of the bottom of the control.

cacheBottom
FormAttachment cacheBottom;
cacheHeight
int cacheHeight;
Undocumented in source.
cacheLeft
FormAttachment cacheLeft;
cacheRight
FormAttachment cacheRight;
cacheTop
FormAttachment cacheTop;
Undocumented in source.
cacheWidth
int cacheWidth;
currentHeight
int currentHeight;
currentHhint
int currentHhint;
Undocumented in source.
currentWhint
int currentWhint;
currentWidth
int currentWidth;
defaultHeight
int defaultHeight;
defaultHhint
int defaultHhint;
Undocumented in source.
defaultWhint
int defaultWhint;
defaultWidth
int defaultWidth;
Undocumented in source.
height
int height;

height specifies the preferred height in pixels. This value is the hHint passed into Control.computeSize(int, int, bool) to determine the preferred size of the control.

isVisited
bool isVisited;
Undocumented in source.
left
FormAttachment left;

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

needed
bool needed;
Undocumented in source.
right
FormAttachment right;

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

top
FormAttachment top;

top specifies the attachment of the top of the control.

width
int width;

width specifies the preferred width in pixels. This value is the wHint passed into Control.computeSize(int, int, bool) to determine the preferred size of the control.

Meta