|
Eclipse Remote Application Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.layout.FormData
public final class FormData
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
.
FormLayout
,
FormAttachment
,
Sample code and further informationField Summary | |
---|---|
FormAttachment |
bottom
bottom specifies the attachment of the bottom of the control. |
int |
height
height specifies the preferred 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 preferred width in pixels. |
Constructor Summary | |
---|---|
FormData()
Constructs a new instance of FormData using default values. |
|
FormData(int width,
int height)
Constructs a new instance of FormData according to the parameters. |
Method Summary | |
---|---|
java.lang.String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int width
Control.computeSize(int, int, boolean)
public int height
Control.computeSize(int, int, boolean)
public FormAttachment left
public FormAttachment right
public FormAttachment top
public FormAttachment bottom
Constructor Detail |
---|
public FormData()
public FormData(int width, int height)
width
- a minimum width for the controlheight
- a minimum height for the controlMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
|
Eclipse Remote Application Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.