Class FormData
java.lang.Object
org.eclipse.swt.layout.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.
- Since:
- 2.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionbottom specifies the attachment of the bottom of the control.(package private) FormAttachment(package private) int(package private) FormAttachment(package private) FormAttachment(package private) FormAttachment(package private) int(package private) int(package private) int(package private) int(package private) int(package private) int(package private) int(package private) int(package private) intintheight specifies the preferred height in points.(package private) booleanleft specifies the attachment of the left side of the control.(package private) booleanright specifies the attachment of the right side of the control.top specifies the attachment of the top of the control.intwidth specifies the preferred width in points. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidcomputeSize(Control control, int wHint, int hHint, boolean flushCache) (package private) void(package private) FormAttachmentgetBottomAttachment(Control control, int spacing, boolean flushCache) (package private) int(package private) FormAttachmentgetLeftAttachment(Control control, int spacing, boolean flushCache) (package private) StringgetName()(package private) FormAttachmentgetRightAttachment(Control control, int spacing, boolean flushCache) (package private) FormAttachmentgetTopAttachment(Control control, int spacing, boolean flushCache) (package private) inttoString()Returns a string containing a concise, human-readable description of the receiver.
-
Field Details
-
width
public int widthwidth specifies the preferred width in points. This value is the wHint passed into Control.computeSize(int, int, boolean) to determine the preferred size of the control. The default value is SWT.DEFAULT.- See Also:
-
height
public int heightheight specifies the preferred height in points. This value is the hHint passed into Control.computeSize(int, int, boolean) to determine the preferred size of the control. The default value is SWT.DEFAULT.- See Also:
-
left
left specifies the attachment of the left side of the control. -
right
right specifies the attachment of the right side of the control. -
top
top specifies the attachment of the top of the control. -
bottom
bottom specifies the attachment of the bottom of the control. -
cacheWidth
int cacheWidth -
cacheHeight
int cacheHeight -
defaultWhint
int defaultWhint -
defaultHhint
int defaultHhint -
defaultWidth
int defaultWidth -
defaultHeight
int defaultHeight -
currentWhint
int currentWhint -
currentHhint
int currentHhint -
currentWidth
int currentWidth -
currentHeight
int currentHeight -
cacheLeft
FormAttachment cacheLeft -
cacheRight
FormAttachment cacheRight -
cacheTop
FormAttachment cacheTop -
cacheBottom
FormAttachment cacheBottom -
isVisited
boolean isVisited -
needed
boolean needed
-
-
Constructor Details
-
FormData
public FormData()Constructs a new instance of FormData using default values. -
FormData
public FormData(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.- Parameters:
width- a minimum width for the controlheight- a minimum height for the control
-
-
Method Details
-
computeSize
-
flushCache
void flushCache() -
getWidth
-
getHeight
-
getBottomAttachment
-
getLeftAttachment
-
getName
String getName() -
getRightAttachment
-
getTopAttachment
-
toString
-