public final class RowData extends Object
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| Modifier and Type | Field and Description |
|---|---|
boolean |
exclude
exclude informs the layout to ignore this control when sizing
and positioning controls.
|
int |
height
height specifies the preferred height in pixels.
|
int |
width
width specifies the desired width in pixels.
|
| Constructor and Description |
|---|
RowData()
Constructs a new instance of RowData using
default values.
|
RowData(int width,
int height)
Constructs a new instance of RowData according to the parameters.
|
RowData(Point point)
Constructs a new instance of RowData according to the parameter.
|
public int width
public int height
public boolean exclude
true,
the size and position of the control will not be managed by the
layout. If this value is false, the size and
position of the control will be computed and assigned.
The default value is false.public RowData()
public RowData(int width,
int height)
width - a minimum width for the controlheight - a minimum height for the controlpublic RowData(Point point)
point - a point whose x coordinate specifies a minimum width for the control
and y coordinate specifies a minimum height for the controlGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.