|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.xtext.ui.editor.tasks.dialogfields.DialogField
public class DialogField
Base class of all dialog fields. Dialog fields manage controls together with the model, independed from the creation time of the widgets. - support for automated layouting. - enable / disable, set focus a concept of the base class. DialogField have a label.
| Field Summary | |
|---|---|
protected java.lang.String |
fLabelText
|
| Constructor Summary | |
|---|---|
DialogField()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String fLabelText
| Constructor Detail |
|---|
public DialogField()
| Method Detail |
|---|
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 composite
public 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||