public class DialogField
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
fLabelText |
Constructor and Description |
---|
DialogField() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertCompositeNotNull(org.eclipse.swt.widgets.Composite comp) |
protected void |
assertEnoughColumns(int nColumns) |
static org.eclipse.swt.widgets.Control |
createEmptySpace(org.eclipse.swt.widgets.Composite parent)
Creates a spacer control.
|
static org.eclipse.swt.widgets.Control |
createEmptySpace(org.eclipse.swt.widgets.Composite parent,
int span)
Creates a spacer control with the given span.
|
void |
dialogFieldChanged()
Programatical invocation of a dialog field change.
|
org.eclipse.swt.widgets.Control[] |
doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
int nColumns)
Creates all controls of the dialog field and fills it to a composite.
|
org.eclipse.swt.widgets.Label |
getLabelControl(org.eclipse.swt.widgets.Composite parent)
Creates or returns the created label widget.
|
int |
getNumberOfControls()
Returns the number of columns of the dialog field.
|
protected static org.eclipse.swt.layout.GridData |
gridDataForLabel(int span) |
boolean |
isEnabled()
Gets the enable state of the dialog field.
|
protected boolean |
isOkToUse(org.eclipse.swt.widgets.Control control)
Tests is the control is not
null and not disposed. |
void |
postSetFocusOnDialogField(org.eclipse.swt.widgets.Display display)
Posts
setFocus to the display event queue. |
void |
refresh()
Brings the UI in sync with the model.
|
void |
setDialogFieldListener(IDialogFieldListener listener)
Defines the listener for this dialog field.
|
void |
setEnabled(boolean enabled)
Sets the enable state of the dialog field.
|
boolean |
setFocus()
Tries to set the focus to the dialog field.
|
void |
setLabelText(java.lang.String labeltext)
Sets the label of the dialog field.
|
protected void |
updateEnableState()
Called when the enable state changed.
|
public void setLabelText(java.lang.String labeltext)
public final void setDialogFieldListener(IDialogFieldListener listener)
public void dialogFieldChanged()
public boolean setFocus()
true
if
the dialog field can take focus. To be reimplemented by dialog field
implementors.public void postSetFocusOnDialogField(org.eclipse.swt.widgets.Display display)
setFocus
to the display event queue.public org.eclipse.swt.widgets.Control[] doFillIntoGrid(org.eclipse.swt.widgets.Composite parent, int nColumns)
MGridLayout
as layout. The
dialog field will adjust its controls' spans to the number of columns
given. To be reimplemented by dialog field implementors.public int getNumberOfControls()
protected static org.eclipse.swt.layout.GridData gridDataForLabel(int span)
public org.eclipse.swt.widgets.Label getLabelControl(org.eclipse.swt.widgets.Composite parent)
parent
- The parent composite or null
if the widget has
already been created.public static org.eclipse.swt.widgets.Control createEmptySpace(org.eclipse.swt.widgets.Composite parent)
parent
- The parent compositepublic static org.eclipse.swt.widgets.Control createEmptySpace(org.eclipse.swt.widgets.Composite parent, int span)
MGridLayout
as layout.parent
- The parent compositeprotected final boolean isOkToUse(org.eclipse.swt.widgets.Control control)
null
and not disposed.public final void setEnabled(boolean enabled)
protected void updateEnableState()
public void refresh()
public final boolean isEnabled()
protected final void assertCompositeNotNull(org.eclipse.swt.widgets.Composite comp)
protected final void assertEnoughColumns(int nColumns)