public final class RowLayoutFactory extends Object
Modifier and Type | Method and Description |
---|---|
void |
applyTo(Composite c)
Creates a new RowLayout and attaches it to the given composite.
|
RowLayoutFactory |
copy()
Creates a copy of the receiver.
|
static RowLayout |
copyLayout(RowLayout layout)
Copies the given RowLayout instance
|
RowLayout |
create()
Creates a new RowLayout, and initializes it with values from the factory.
|
static RowLayoutFactory |
createFrom(RowLayout layout)
Creates a factory that creates copies of the given layout.
|
RowLayoutFactory |
extendedMargins(int left,
int right,
int top,
int bottom)
Sets the margins for layouts created with this factory.
|
RowLayoutFactory |
fill(boolean fill)
Fill specifies whether the controls in a row should be all the same
height for horizontal layouts, or the same width for vertical layouts.
|
static RowLayoutFactory |
fillDefaults()
Creates a RowLayoutFactory that creates RowLayouts with no margins, fill
behavior, and default dialog spacing.
|
RowLayoutFactory |
justify(boolean justify)
Justify specifies whether the controls in a row should be fully
justified, with any extra space placed between the controls.
|
RowLayoutFactory |
margins(int width,
int height)
Sets the margins for layouts created with this factory.
|
RowLayoutFactory |
margins(Point margins)
Sets the margins for layouts created with this factory.
|
RowLayoutFactory |
pack(boolean pack)
Pack specifies whether all controls in the layout take their preferred
size.
|
RowLayoutFactory |
spacing(int spacing)
Sets the spacing for layouts created with this factory.
|
static RowLayoutFactory |
swtDefaults()
Creates a RowLayoutFactory that creates RowLayouts with the default SWT
values.
|
RowLayoutFactory |
type(int type)
type specifies whether the layout places controls in rows or columns.
|
RowLayoutFactory |
wrap(boolean wrap)
Wrap specifies whether a control will be wrapped to the next row if there
is insufficient space on the current row.
|
public static RowLayoutFactory createFrom(RowLayout layout)
layout
- layout to copypublic RowLayoutFactory copy()
public static RowLayoutFactory swtDefaults()
Initial values are:
fillDefaults()
public static RowLayoutFactory fillDefaults()
Initial values are:
swtDefaults()
public RowLayoutFactory spacing(int spacing)
spacing
- spacing (pixels)margins(Point)
,
margins(int, int)
public RowLayoutFactory margins(Point margins)
margins
- margin size (pixels)spacing(int)
public RowLayoutFactory margins(int width, int height)
extendedMargins(int, int, int, int)
.width
- margin width (pixels)height
- margin height (pixels)spacing(int)
public RowLayoutFactory extendedMargins(int left, int right, int top, int bottom)
margins(int, int)
.left
- left margin size (pixels)right
- right margin size (pixels)top
- top margin size (pixels)bottom
- bottom margin size (pixels)spacing(int)
public RowLayoutFactory fill(boolean fill)
fill
- the fill statuspublic RowLayoutFactory justify(boolean justify)
justify
- the justify statuspublic RowLayoutFactory pack(boolean pack)
pack
- the pack statuspublic RowLayoutFactory wrap(boolean wrap)
wrap
- the wrap statuspublic RowLayoutFactory type(int type)
type
- One of SWT.HORIZONTAL or SWT.VERTICALIllegalArgumentException
- if type is not one of HORIZONTAL or VERTICALpublic RowLayout create()
applyTo(org.eclipse.swt.widgets.Composite)
public void applyTo(Composite c)
c
- composite whose layout will be setcreate()
,
RowLayoutFactory
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.