public class LayoutUtil
extends java.lang.Object
UI Layout Utility
Provides utility methods to set parameters of UI layouts.
| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAX_WITDH
The maximum width allowed for this field.
|
| Constructor and Description |
|---|
LayoutUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.eclipse.swt.layout.GridData |
gridDataForButton(org.eclipse.swt.widgets.Button button,
int span)
Creates a
GridData for the specified button widget. |
static org.eclipse.swt.layout.GridData |
gridDataForButtons(int span) |
static org.eclipse.swt.layout.GridData |
gridDataForCCombo(int span) |
static org.eclipse.swt.layout.GridData |
gridDataForCombo(int span) |
static org.eclipse.swt.layout.GridData |
gridDataForLabel(int span) |
static org.eclipse.swt.layout.GridData |
gridDataForLabel(int span,
boolean multiLine) |
static org.eclipse.swt.layout.GridData |
gridDataForList(int span,
PixelConverter converter) |
static org.eclipse.swt.layout.GridData |
gridDataForSeperator(int span,
int height) |
static org.eclipse.swt.layout.GridData |
gridDataForSpecificComposite(int span)
Convenient method for creating a
GridData dedicated to a specific composite (e.g. |
static org.eclipse.swt.layout.GridData |
gridDataForSpecificComposite(int span,
boolean hgrab,
boolean vgrab)
Convenient method for creating a
GridData dedicated to a specific composite (e.g. |
static org.eclipse.swt.layout.GridData |
gridDataForText(int span) |
static org.eclipse.swt.layout.GridLayout |
gridLayoutForSpecificComposite(int numColumns)
Convenient method for creating a
GridLayout dedicated to a specific composite
(e.g. |
static void |
setHorizontalGrabbing(org.eclipse.swt.widgets.Control control)
Sets the horizontal grabbing of a control to true.
|
static void |
setHorizontalSpan(org.eclipse.swt.widgets.Control control,
int span)
Sets the span of a control.
|
static void |
setWidthHint(org.eclipse.swt.widgets.Control control,
int widthHint)
Sets the width hint of a control.
|
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForButton(org.eclipse.swt.widgets.Button button,
int span)
Creates a
TableWrapData for the specified button widget. |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForButtons(int span) |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForCCombo(int span) |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForCombo(int span) |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForLabel(int span) |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForLabel(int span,
boolean multiLine) |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForList(int span,
PixelConverter converter) |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForSpecificComposite(int span)
Convenient method for creating a
TableWrapData dedicated to a specific composite
(e.g. |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForSpecificComposite(int span,
boolean hgrab,
boolean vgrab)
Convenient method for creating a
TableWrapData dedicated to a specific composite
(e.g. |
static org.eclipse.ui.forms.widgets.TableWrapData |
tableWrapDataForText(int span) |
static org.eclipse.ui.forms.widgets.TableWrapLayout |
tableWrapLayoutForSpecificComposite(int numColumns)
Convenient method for creating a
TableWrapLayout dedicated to a specific composite
(e.g. |
protected static final int MAX_WITDH
public static void setWidthHint(org.eclipse.swt.widgets.Control control,
int widthHint)
public static void setHorizontalGrabbing(org.eclipse.swt.widgets.Control control)
public static void setHorizontalSpan(org.eclipse.swt.widgets.Control control,
int span)
public static final org.eclipse.swt.layout.GridData gridDataForCombo(int span)
public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForCombo(int span)
public static final org.eclipse.swt.layout.GridData gridDataForCCombo(int span)
public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForCCombo(int span)
public static final org.eclipse.swt.layout.GridData gridDataForButtons(int span)
public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForButtons(int span)
public static final org.eclipse.swt.layout.GridData gridDataForButton(org.eclipse.swt.widgets.Button button,
int span)
GridData for the specified button widget.
This method initializes grid data as follows:
button - The button widget for which a grid data must be created and initialized.span - The number of columns the button must take up.GridData for the specified button, correctly initialized.public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForButton(org.eclipse.swt.widgets.Button button,
int span)
TableWrapData for the specified button widget.
This method initializes table wrap data as follows:
button - The button widget for which a table wrap data must be created and initialized.span - The number of columns the button must take up.TableWrapData for the specified button, correctly initialized.public static final org.eclipse.swt.layout.GridData gridDataForLabel(int span)
public static final org.eclipse.swt.layout.GridData gridDataForLabel(int span,
boolean multiLine)
public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForLabel(int span)
public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForLabel(int span,
boolean multiLine)
public static final org.eclipse.swt.layout.GridData gridDataForList(int span,
PixelConverter converter)
public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForList(int span,
PixelConverter converter)
public static final org.eclipse.swt.layout.GridData gridDataForText(int span)
public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForText(int span)
public static final org.eclipse.swt.layout.GridData gridDataForSeperator(int span,
int height)
public static final org.eclipse.swt.layout.GridData gridDataForSpecificComposite(int span)
GridData dedicated to a specific composite (e.g.
for list button field or string button field).span - The number of column the composite (for which the grid data is created) will take up.public static final org.eclipse.swt.layout.GridData gridDataForSpecificComposite(int span,
boolean hgrab,
boolean vgrab)
GridData dedicated to a specific composite (e.g.
for list button field or string button field).span - The number of column the composite (for which the grid data is created) will take up.hgrab - Flag indicating whether composite (for which the grid data is created) should be made wide enough to
fit the remaining horizontal space.vgrab - Flag indicating whether composite (for which the grid data is created) should be made wide enough to
fit the remaining vertical space.public static final org.eclipse.swt.layout.GridLayout gridLayoutForSpecificComposite(int numColumns)
GridLayout dedicated to a specific composite
(e.g. for list button field or string button field).numColumns - The number of columns in the layout.public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForSpecificComposite(int span)
TableWrapData dedicated to a specific composite
(e.g. for list button field or string button field).span - The number of columns the composite (for which the table wrap data is created) will take up.public static final org.eclipse.ui.forms.widgets.TableWrapData tableWrapDataForSpecificComposite(int span,
boolean hgrab,
boolean vgrab)
TableWrapData dedicated to a specific composite
(e.g. for list button field or string button field).span - The number of columns the composite (for which the table wrap data is created) will take up.hgrab - Flag indicating whether composite (for which the table wrap data is created) should be made wide
enough to fit the remaining horizontal space.vgrab - Flag indicating whether composite (for which the table wrap data is created) should be made wide
enough to fit the remaining vertical space.public static final org.eclipse.ui.forms.widgets.TableWrapLayout tableWrapLayoutForSpecificComposite(int numColumns)
TableWrapLayout dedicated to a specific composite
(e.g. for list button field or string button field).numColumns - The number of columns in the layout.