public final class UIUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Button |
createButton(Composite parent,
java.lang.String text,
boolean enabled,
SelectionListener selectionListener)
Create and return a new button.
|
static Button |
createCheckbox(Composite composite,
boolean enabled,
boolean selected,
SelectionListener selectionListener)
Create and return a new checkbox.
|
static Combo |
createCombobox(Composite parent,
boolean enabled,
java.util.List<java.lang.String> elements,
java.lang.String label,
SelectionListener listener)
Create a combobox with a label.
|
static Label |
createLabel(Composite parent,
java.lang.String labelName)
Create the label (with the given labelName) in the given composite.
|
static Spinner |
createSpinner(Composite parent,
int maxValue,
int minValue,
int increment,
boolean changeable,
ModifyListener modifyListener)
Create and return a new spinner.
|
static Text |
createTextArea(Composite parent,
java.lang.String text,
boolean enabled,
ModifyListener modifyListener)
Create and return a new text field.
|
static Text |
createTextField(Composite parent,
java.lang.String text,
boolean enabled,
ModifyListener modifyListener)
Create and return a new text field.
|
static GridData |
getLabelGridData() |
public static Label createLabel(Composite parent,
java.lang.String labelName)
getLabelGridData().parent - the composite parent.labelName - the label name.public static Button createButton(Composite parent,
java.lang.String text,
boolean enabled,
SelectionListener selectionListener)
parent - the button parent.text - the text to display on the button.enabled - set if the button can be pressed or not.selectionListener - the listener when the button is pressed (can be null).public static Text createTextField(Composite parent,
java.lang.String text,
boolean enabled,
ModifyListener modifyListener)
parent - the text field parent.text - the text to display on the text field.enabled - set if the text field can be edit or not.selectListener - the listener when the text field is edited (can be null).public static Combo createCombobox(Composite parent,
boolean enabled,
java.util.List<java.lang.String> elements,
java.lang.String label,
SelectionListener listener)
parent - the parent of the combobox.enabled - if the combobox is enabled.elements - the elements of the comboboxlistener - the listener of the combobox (can be null)public static Text createTextArea(Composite parent,
java.lang.String text,
boolean enabled,
ModifyListener modifyListener)
parent - the text field parent.text - the text to display on the text field.enabled - set if the text field can be edit or not.selectListener - the listener when the text field is edited (can be null).public static GridData getLabelGridData()
public static Button createCheckbox(Composite composite,
boolean enabled,
boolean selected,
SelectionListener selectionListener)
parent - the checkbox parent.enabled - set if the checkbox can be checked or not.selected - set if the checkbox is initially selected or not.selectionListener - the listener when the checkbox is selected (can be null).public static Spinner createSpinner(Composite parent,
int maxValue,
int minValue,
int increment,
boolean changeable,
ModifyListener modifyListener)
parent - the parent of the spinner.maxValue - the max value the spinner can reach.minValue - the min value the spinner can reach.increment - the increment of the spinner.changeable - if the spinner is changeable or not.modifyListener - the listener when the spinner is changed (can be null).Spinner