org.eclipse.swt.layout
Class RowData
java.lang.Object
org.eclipse.swt.layout.RowData
public final class RowData
- extends java.lang.Object
Each control controlled by a 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));
- See Also:
RowLayout
Field Summary |
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. |
Method Summary |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
width
public int width
- width specifies the desired width in pixels. 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.
height
public int height
- height specifies the preferred height in pixels. 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.
exclude
public boolean exclude
- exclude informs the layout to ignore this control when sizing
and positioning controls. If this value is
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
.
- Since:
- 3.1
RowData
public RowData()
RowData
public RowData(int width,
int height)
RowData
public RowData(Point point)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object