|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.swt.forms.Forms
public final class Forms
Utility methods for form creation/management.
Method Summary | |
---|---|
static org.eclipse.swt.widgets.Button |
button(org.eclipse.swt.widgets.Composite parent,
String text,
int style)
Creates a Button within the given parent with the given text and
style. |
static org.eclipse.swt.widgets.Combo |
combo(org.eclipse.swt.widgets.Composite parent,
String labelText,
int style)
Create a label and combo box, and thus takes two cells worth of space. |
static org.eclipse.swt.widgets.Combo |
combo(org.eclipse.swt.widgets.Composite parent,
String labelText,
int columns,
int style)
Create a label and combo box, and thus takes two cells worth of space. |
static org.eclipse.swt.widgets.Label |
description(org.eclipse.swt.widgets.Composite parent,
String text)
Create a wrapping description label. |
static org.eclipse.swt.widgets.Label |
description(org.eclipse.swt.widgets.Composite parent,
String text,
int columns)
Create a wrapping description label. |
static org.eclipse.swt.widgets.Label |
getLabel(org.eclipse.swt.widgets.Control control)
Get the label associated with a control created by the text(Composite, String) or combo(Composite, String, int)
methods. |
static org.eclipse.swt.layout.GridLayout |
gridLayout(org.eclipse.swt.widgets.Composite panel,
int columns)
Creates a GridLayout instance with the given number of columns and
margin width and height of 0, a GridLayout.verticalSpacing value of
6, and sets it to be the layout of the given Composite
panel . |
static org.eclipse.swt.layout.GridLayout |
gridLayout(org.eclipse.swt.widgets.Composite panel,
int columns,
int margin)
Creates a GridLayout instance with the given number of columns and
margin width and height of margin , a
GridLayout.verticalSpacing value of 6, and sets it to be the layout
of the given Composite panel . |
static org.eclipse.swt.widgets.Group |
group(org.eclipse.swt.widgets.Composite parent,
String text)
Creates a Group within the given parent with the given text and the
style SWT.SHADOW_ETCHED_IN Sets the layout of the Group to
be a GridLayout . |
static org.eclipse.swt.widgets.Group |
group(org.eclipse.swt.widgets.Composite parent,
String text,
int style)
Creates a Group within the given parent with the given text and
style. |
static org.eclipse.swt.widgets.Label |
label(org.eclipse.swt.widgets.Composite panel,
String text)
Creates a left-aligned Label within the parent Composite
panel with the provided text. |
static org.eclipse.swt.widgets.Label |
label(org.eclipse.swt.widgets.Composite panel,
String text,
int style)
Creates a Label within the parent Composite
panel with the provided text and style. |
static org.eclipse.swt.widgets.Label |
label(org.eclipse.swt.widgets.Composite panel,
String text,
int columns,
int style)
Creates a Label within the parent Composite
panel with the provided text and style. |
static org.eclipse.swt.widgets.Text |
text(org.eclipse.swt.widgets.Composite parent,
String labelText)
Create a text field with a descriptive label to the left, and thus takes two cells worth of space. |
static org.eclipse.swt.widgets.Text |
text(org.eclipse.swt.widgets.Composite parent,
String labelText,
int columns)
Create a text field with space for the specified number of columns with a descriptive label to the left, and thus takes two cells worth of space. |
static org.eclipse.swt.widgets.Text |
text(org.eclipse.swt.widgets.Composite parent,
String labelText,
int columns,
int hSpan)
Create a text field with space for the specified number of columns with a descriptive label to the left, and thus takes an extra cell's worth of space. |
static org.eclipse.swt.widgets.Text |
text(org.eclipse.swt.widgets.Composite parent,
String labelText,
int columns,
int hSpan,
int style)
Create a text field with space for the specified number of columns with a descriptive label to the left, and thus takes an extra cell's worth of space. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.eclipse.swt.widgets.Label description(org.eclipse.swt.widgets.Composite parent, String text)
public static org.eclipse.swt.widgets.Label description(org.eclipse.swt.widgets.Composite parent, String text, int columns)
parent
- The parent component.text
- The text to display.columns
- The suggested number of columns for the text. If 0, the
column count is the same as the numer of characters in the text, ensuring
the text is on one line.public static org.eclipse.swt.widgets.Text text(org.eclipse.swt.widgets.Composite parent, String labelText)
Widget.getData(String)
with the property "label".
Assumes that the Composite
this Control
is being added to
is using the GridLayout
.
parent
- The parent component.labelText
- The text of the label.
text(Composite,String,int)
,
getLabel(Control)
public static org.eclipse.swt.widgets.Text text(org.eclipse.swt.widgets.Composite parent, String labelText, int columns)
Widget.getData(String)
with the property
"label".
Assumes that the Composite
this Control
is being added to
is using the GridLayout
.
parent
- The parent component.labelText
- The text of the label.columns
- The suggested number of colums of text for the field.
getLabel(Control)
public static org.eclipse.swt.widgets.Text text(org.eclipse.swt.widgets.Composite parent, String labelText, int columns, int hSpan)
Widget.getData(String)
with the
property "label". The text field's resizing is governed by the
hSpan
parameter, which is expected to be a value appropriate
for GridData.horizontalSpan
.
Assumes that the Composite
this Control
is being added to
is using the GridLayout
.
parent
- The parent component.labelText
- The text of the label.columns
- The suggested number of colums of text for the field.hSpan
- The horizontal (GridLayout) span of the text.
getLabel(Control)
public static org.eclipse.swt.widgets.Text text(org.eclipse.swt.widgets.Composite parent, String labelText, int columns, int hSpan, int style)
Widget.getData(String)
with the
property "label". The text field's resizing is governed by the
hSpan
parameter, which is expected to be a value appropriate
for GridData.horizontalSpan
. The style of the text field is
specified by style
.
Assumes that the Composite
this Control
is being added to
is using the GridLayout
.
parent
- The parent component.labelText
- The text of the label.columns
- The suggested number of colums of text for the field.hSpan
- The horizontal (GridLayout) span of the text.style
- The style for the text field.
getLabel(Control)
public static org.eclipse.swt.widgets.Combo combo(org.eclipse.swt.widgets.Composite parent, String labelText, int style)
Widget.getData(String)
with the property
"label". The style of the combo is specified by style
.
Assumes that the Composite
this Control
is being added to
is using the GridLayout
.
parent
- The parent control.labelText
- The text for the combo label.style
- The style for the combo.
combo(Composite, String, int, int)
,
getLabel(Control)
public static org.eclipse.swt.widgets.Combo combo(org.eclipse.swt.widgets.Composite parent, String labelText, int columns, int style)
Widget.getData(String)
with the property
"label". The style of the combo is specified by style
. The
columns
parameter is used to set the width hint for the combo.
Assumes that the Composite
this Control
is being added to
is using the GridLayout
.
parent
- The parent control.labelText
- The text for the combo label.columns
- The number of columns for the combo. Can be SWT.DEFAULT.style
- The style for the combo.
getLabel(Control)
public static org.eclipse.swt.widgets.Label getLabel(org.eclipse.swt.widgets.Control control)
text(Composite, String)
or combo(Composite, String, int)
methods.
public static org.eclipse.swt.widgets.Group group(org.eclipse.swt.widgets.Composite parent, String text)
Group
within the given parent with the given text and the
style SWT.SHADOW_ETCHED_IN
Sets the layout of the Group
to
be a GridLayout
.
parent
- The parent of the Group
.text
- The text to show at the top of the Group
.
Group
.public static org.eclipse.swt.widgets.Group group(org.eclipse.swt.widgets.Composite parent, String text, int style)
Group
within the given parent with the given text and
style. Sets the layout of the Group
to be a GridLayout
.
parent
- The parent of the Group
.text
- The text to show at the top of the Group
.style
- The SWT style use use for the Group
.
Group
.public static org.eclipse.swt.widgets.Button button(org.eclipse.swt.widgets.Composite parent, String text, int style)
Button
within the given parent with the given text and
style.
parent
- The parent Composite
for the Button
.text
- The text to show on the Button
.style
- The SWT style of the Button
.
Button
.public static org.eclipse.swt.layout.GridLayout gridLayout(org.eclipse.swt.widgets.Composite panel, int columns)
GridLayout
instance with the given number of columns and
margin width and height of 0, a GridLayout.verticalSpacing
value of
6, and sets it to be the layout of the given Composite
panel
.
NB There is no need to invoke panel.setLayout()
with
the returned GridLayout
because it's already been done.
panel
- The Composite
for which to create and set the layout.columns
- The number of columns the layout will have.
GridLayout
, which has been set on the provided
panel
.public static org.eclipse.swt.layout.GridLayout gridLayout(org.eclipse.swt.widgets.Composite panel, int columns, int margin)
GridLayout
instance with the given number of columns and
margin width and height of margin
, a
GridLayout.verticalSpacing
value of 6, and sets it to be the layout
of the given Composite
panel
.
NB There is no need to invoke panel.setLayout()
with
the returned GridLayout
because it's already been done.
panel
- The Composite
for which to create and set the
layout.columns
- The number of columns the layout will have.margin
- The value to use for the layout's margin width and height.
GridLayout
, which has been set on
the provided panel
.public static org.eclipse.swt.widgets.Label label(org.eclipse.swt.widgets.Composite panel, String text)
Label
within the parent Composite
panel
with the provided text.
panel
- The parent for the Label
.text
- The text for the Label
to show.
Label
.public static org.eclipse.swt.widgets.Label label(org.eclipse.swt.widgets.Composite panel, String text, int style)
Label
within the parent Composite
panel
with the provided text and style.
panel
- The parent for the Label
.text
- The text for the Label
to show.
Label
.public static org.eclipse.swt.widgets.Label label(org.eclipse.swt.widgets.Composite panel, String text, int columns, int style)
Label
within the parent Composite
panel
with the provided text and style.
panel
- The parent for the Label
.text
- The text for the Label
to show.columns
- The suggested max number of columns or
SWT.DEFAULT. This only makes sense when SWT.WRAP is
used.
Label
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |