RowLayout can have its initial
width and height specified by setting a RowData object
into the control.
The following code uses a RowData object to change the initial
size of a Button in a Shell:
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new RowLayout());
Button button1 = new Button(shell, SWT.PUSH);
button1.setText("Button 1");
button1.setLayoutData(new RowData(50, 40));
RowLayout, Sample code and further information
| Modifier and Type | Field and Description |
|---|---|
| public boolean | exclude
exclude informs the layout to ignore this control when sizing and positioning controls. |
| public int | height
height specifies the preferred height in points. |
| public int | width
width specifies the desired width in points. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | RowData(int
a minimum width for the control width, int a minimum height for the control height)Constructs a new instance of RowData according to the parameters. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | |
| public String | Returns: a string representation of the RowData objectOverrides java. |
| exclude | back to summary |
|---|---|
| public boolean exclude exclude informs the layout to ignore this control when sizing
and positioning controls. If this value is
| |
| height | back to summary |
|---|---|
| public int height height 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. | |
| width | back to summary |
|---|---|
| public int width width specifies the desired 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. | |
| RowData | back to summary |
|---|---|
| public RowData() Constructs a new instance of RowData using default values. | |
| RowData | back to summary |
|---|---|
| public RowData(int width, int height) Constructs a new instance of RowData according to the parameters. A value of SWT.DEFAULT indicates that no minimum width or no minimum height is specified.
| |
| RowData | back to summary |
|---|---|
| public RowData(Point point) Constructs a new instance of RowData according to the parameter. A value of SWT.DEFAULT indicates that no minimum width or no minimum height is specified.
| |
| getName | back to summary |
|---|---|
| pack-priv String getName() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |