jruby/docs BETA
org.eclipse.swt.layout 11
C BorderData
C BorderLayout
C FillLayout
C FormAttachment
C FormData
C FormLayout
C GridData
C GridLayout
C RowData
C RowLayout
C TabFolderLayout
RowData — members 7
F width() int
F height() int
F exclude() boolean
C new()
C new(width, height)
C new(point)
M to_string() String

org.eclipse.swt.layout.RowData

class final 7 members

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));

Fields

fieldtypenote
width int 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.
height int 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.
exclude boolean 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.

Constructors

new

new ( )
Java: <init>()

Constructs a new instance of RowData using default values.

new

new ( int width, int height )
Java: <init>(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.

nametypedescription
widthinta minimum width for the control
heightinta minimum height for the control

new

new ( Point point )
Java: <init>(org.eclipse.swt.graphics.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.

nametypedescription
pointorg.eclipse.swt.graphics.Pointa point whose x coordinate specifies a minimum width for the control and y coordinate specifies a minimum height for the control

Instance Methods

to_string

String to_string ( )
Java: toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns: a string representation of the RowData object