public final class RowData
extends java.lang.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
,
Sample code and further informationModifier 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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Returns a string containing a concise, human-readable
description of the receiver.
|
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 control
Copyright (c) EclipseSource and others 2002, 2015.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0