|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.layout.RowLayoutFactory
public final class RowLayoutFactory
RowLayoutFactory creates and initializes row layouts. There are two ways to use RowLayoutFactory. Normally, it is used as a shorthand for writing "new RowLayout()" and initializing a bunch of fields. In this case the main benefit is a more concise syntax and the ability to create more than one identical RowLayout from the same factory. Changing a property of the factory will affect future layouts created by the factory, but has no effect on layouts that have already been created.
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static RowLayoutFactory createFrom(RowLayout layout)
layout - layout to copy
public 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 status
public RowLayoutFactory justify(boolean justify)
justify - the justify status
public RowLayoutFactory pack(boolean pack)
pack - the pack status
public RowLayoutFactory wrap(boolean wrap)
wrap - the wrap status
public RowLayoutFactory type(int type)
type - One of SWT.HORIZONTAL or SWT.VERTICAL
IllegalArgumentException - 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(),
RowLayoutFactorypublic static RowLayout copyLayout(RowLayout layout)
layout - layout to copy
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.