|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eparapher.rcp.tools.BaseWidgetUtils
public class BaseWidgetUtils
This class provides utility methods to create SWT widgets.
| Constructor Summary | |
|---|---|
BaseWidgetUtils()
|
|
| Method Summary | |
|---|---|
static org.eclipse.swt.widgets.Button |
createButton(org.eclipse.swt.widgets.Composite parent,
String text,
org.eclipse.swt.graphics.Image img,
int span)
Creates a button under the given parent. |
static org.eclipse.swt.widgets.Button |
createCheckbox(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a checkbox under the given parent. |
static org.eclipse.swt.widgets.Composite |
createColumnContainer(org.eclipse.swt.widgets.Composite parent,
int columnCount,
int span)
Creates a SWT Composite under the given parent. |
static org.eclipse.swt.widgets.Combo |
createCombo(org.eclipse.swt.widgets.Composite parent,
String[] items,
int selectedIndex,
int span)
Creates a SWT Combo under the given parent. |
static org.eclipse.swt.widgets.Group |
createGroup(org.eclipse.swt.widgets.Composite parent,
String label,
int span)
Creates a SWT Group under the given parent. |
static org.eclipse.swt.widgets.Label |
createLabel(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Label under the given parent. |
static org.eclipse.swt.widgets.Text |
createLabeledText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Text under the given parent. |
static org.eclipse.swt.widgets.Text |
createLabeledText(org.eclipse.swt.widgets.Composite parent,
String text,
int span,
int widthHint)
Creates a SWT Text under the given parent. |
static org.eclipse.swt.widgets.Link |
createLink(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Link under the given parent. |
static org.eclipse.swt.widgets.Text |
createPasswordText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Text under the given parent. |
static org.eclipse.swt.widgets.Button |
createRadiobutton(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a radio button under the given parent. |
static void |
createRadioIndent(org.eclipse.swt.widgets.Composite parent,
int span)
Adds some space to indent radio buttons. |
static org.eclipse.swt.widgets.Combo |
createReadonlyCombo(org.eclipse.swt.widgets.Composite parent,
String[] items,
int selectedIndex,
int span)
Creates a SWT Combo under the given parent. |
static org.eclipse.swt.widgets.Text |
createReadonlyPasswordText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Text under the given parent. |
static org.eclipse.swt.widgets.Text |
createReadonlyText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Text under the given parent. |
static void |
createSeparator(org.eclipse.swt.widgets.Composite parent,
int span)
Creates a separator line. |
static void |
createSpacer(org.eclipse.swt.widgets.Composite parent,
int span)
Creates a spacer. |
static org.eclipse.swt.widgets.Text |
createText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Text under the given parent. |
static org.eclipse.swt.widgets.Text |
createText(org.eclipse.swt.widgets.Composite parent,
String text,
int textWidth,
int span)
Creates a SWT Text under the given parent. |
static org.eclipse.swt.widgets.Label |
createWrappedLabel(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Label under the given parent. |
static org.eclipse.swt.widgets.Text |
createWrappedLabeledText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Creates a SWT Text under the given parent. |
static org.eclipse.swt.widgets.Text |
createWrappedLabeledText(org.eclipse.swt.widgets.Composite parent,
String text,
int span,
int widthHint)
Creates a SWT Text under the given parent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseWidgetUtils()
| Method Detail |
|---|
public static org.eclipse.swt.widgets.Group createGroup(org.eclipse.swt.widgets.Composite parent,
String label,
int span)
Group under the given parent.
parent - the parentlabel - the label of the groupspan - the horizontal span
public static org.eclipse.swt.widgets.Composite createColumnContainer(org.eclipse.swt.widgets.Composite parent,
int columnCount,
int span)
Composite under the given parent.
A GridLayout with the given number of columns is used.
parent - the parentcolumnCount - the number of columnsspan - the horizontal span
public static org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Label under the given parent.
parent - the parenttext - the label's textspan - the horizontal span
public static org.eclipse.swt.widgets.Label createWrappedLabel(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Label under the given parent.
The label is created with the SWT.WRAP style to enable line wrapping.
parent - the parenttext - the label's textspan - the horizontal span
public static org.eclipse.swt.widgets.Text createText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Text under the given parent.
The created text control is modifyable.
parent - the parenttext - the initial textspan - the horizontal span
public static org.eclipse.swt.widgets.Text createText(org.eclipse.swt.widgets.Composite parent,
String text,
int textWidth,
int span)
Text under the given parent.
The created text control is modifyable.
parent - the parenttext - the initial texttextWidth - the width of the text controlspan - the horizontal span
public static org.eclipse.swt.widgets.Text createPasswordText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Text under the given parent.
The created text control is created with the SWT.PASSWORD style.
parent - the parenttext - the initial textspan - the horizontal span
public static org.eclipse.swt.widgets.Text createReadonlyPasswordText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Text under the given parent.
The created text control is created with the SWT.PASSWORD and
SWT.READ_ONLY style. So the created controls is not modifyable.
parent - the parenttext - the initial textspan - the horizontal span
public static org.eclipse.swt.widgets.Text createLabeledText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Text under the given parent.
The created text control behaves like a label: it has no border,
a grayed background and is not modifyable.
But the text is selectable and could be copied.
parent - the parenttext - the initial textspan - the horizontal span
public static org.eclipse.swt.widgets.Text createLabeledText(org.eclipse.swt.widgets.Composite parent,
String text,
int span,
int widthHint)
Text under the given parent.
The created text control behaves like a label: it has no border,
a grayed background and is not modifyable.
But the text is selectable and could be copied.
parent - the parenttext - the initial textspan - the horizontal spanwidthHint - the width hint
public static org.eclipse.swt.widgets.Text createWrappedLabeledText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Text under the given parent.
The created text control behaves like a label: it has no border,
a grayed background and is not modifyable.
But the text is selectable and could be copied.
The label is created with the SWT.WRAP style to enable line wrapping.
parent - the parenttext - the initial textspan - the horizontal span
public static org.eclipse.swt.widgets.Text createWrappedLabeledText(org.eclipse.swt.widgets.Composite parent,
String text,
int span,
int widthHint)
Text under the given parent.
The created text control behaves like a label: it has no border,
a grayed background and is not modifyable.
But the text is selectable and could be copied.
The label is created with the SWT.WRAP style to enable line wrapping.
parent - the parenttext - the initial textspan - the horizontal spanwidthHint - the width hint
public static org.eclipse.swt.widgets.Text createReadonlyText(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Text under the given parent.
The text is not modifyable, but the text is selectable
and could be copied.
parent - the parenttext - the initial textspan - the horizontal span
public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
String[] items,
int selectedIndex,
int span)
Combo under the given parent.
Beside the selection of an item it is also possible to type
free text into the combo.
parent - the parentitems - the initial visible itemsselectedIndex - the initial selected item, zero-basedspan - the horizontal span
public static org.eclipse.swt.widgets.Combo createReadonlyCombo(org.eclipse.swt.widgets.Composite parent,
String[] items,
int selectedIndex,
int span)
Combo under the given parent.
It is not possible to type free text into the combo, only
selection of predefined items is possible.
parent - the parentitems - the initial visible itemsselectedIndex - the initial selected item, zero-basedspan - the horizontal span
public static org.eclipse.swt.widgets.Button createCheckbox(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
parent - the parenttext - the label of the checkboxspan - the horizontal span
public static org.eclipse.swt.widgets.Button createRadiobutton(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
parent - the parenttext - the label of the radio buttonspan - the horizontal span
public static org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent,
String text,
org.eclipse.swt.graphics.Image img,
int span)
parent - the parenttext - the label of the buttonspan - the horizontal span
public static void createRadioIndent(org.eclipse.swt.widgets.Composite parent,
int span)
parent - the parentspan - the horizontal span
public static void createSpacer(org.eclipse.swt.widgets.Composite parent,
int span)
parent - the parentspan - the horizontal span
public static void createSeparator(org.eclipse.swt.widgets.Composite parent,
int span)
parent - the parentspan - the horizontal span
public static org.eclipse.swt.widgets.Link createLink(org.eclipse.swt.widgets.Composite parent,
String text,
int span)
Link under the given parent.
parent - the parenttext - the initial textspan - the horizontal span
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||