IEEFLifecycleManager
EEFButtonLifecycleManager
, EEFCheckboxLifecycleManager
, EEFHyperlinkLifecycleManager
, EEFLabelLifecycleManager
, EEFListLifecycleManager
, EEFRadioLifecycleManager
, EEFSelectLifecycleManager
, EEFTextLifecycleManager
public abstract class AbstractEEFWidgetLifecycleManager extends AbstractEEFLifecycleManager
Modifier and Type | Field | Description |
---|---|---|
protected EditingContextAdapter |
editingContextAdapter |
The editing context adapter.
|
protected org.eclipse.swt.custom.CLabel |
help |
The help label.
|
protected org.eclipse.sirius.common.interpreter.api.IInterpreter |
interpreter |
The interpreter.
|
protected org.eclipse.swt.custom.StyledText |
label |
The label.
|
protected static int |
VALIDATION_MARKER_OFFSET |
The number of pixel of the additional gap necessary to draw the validation marker.
|
protected org.eclipse.sirius.common.interpreter.api.IVariableManager |
variableManager |
The variable manager.
|
container
Constructor | Description |
---|---|
AbstractEEFWidgetLifecycleManager(org.eclipse.sirius.common.interpreter.api.IVariableManager variableManager,
org.eclipse.sirius.common.interpreter.api.IInterpreter interpreter,
EditingContextAdapter editingContextAdapter) |
The constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
aboutToBeHidden() |
Prepares for the widgets to be hidden.
|
void |
aboutToBeShown() |
Prepares for the widgets to be shown.
|
void |
createControl(org.eclipse.swt.widgets.Composite parent,
IEEFFormContainer formContainer) |
Creates the controls for the description.
|
protected abstract void |
createMainControl(org.eclipse.swt.widgets.Composite parent,
IEEFFormContainer formContainer) |
Create the main control.
|
void |
dispose() |
Disposes the content created.
|
protected abstract IEEFWidgetController |
getController() |
Returns the controller.
|
protected EEFStyleHelper |
getEEFStyleHelper() |
Returns the style helper used to compute the style of the widget.
|
protected int |
getLabelVerticalAlignment() |
Returns the vertical alignment of the label of the widget.
|
protected org.eclipse.jface.viewers.IStructuredSelection |
getStructuredSelection(org.eclipse.jface.viewers.StructuredViewer viewer) |
Returns the
IStructuredSelection of the specified viewer. |
protected abstract EEFWidgetDescription |
getWidgetDescription() |
Returns the description of the widget.
|
protected java.lang.Object |
getWidgetSemanticElement() |
Returns the semantic element of the current widget.
|
protected boolean |
isEnabled() |
Check if a widget is enabled.
|
protected void |
lockedByMe() |
Sets the appearance and behavior of the widget in order to indicate that the semantic element used by the widget
is currently locked by the current user.
|
protected void |
lockedByOther() |
Sets the appearance and behavior of the widget in order to indicate that the semantic element used by the widget
is currently locked by another user.
|
protected void |
lockedNoWrite() |
Sets the appearance and behavior of the widget in order to indicate that the semantic element used by the widget
cannot be modified by the user.
|
protected boolean |
needSeparatedLabel() |
Indicates if the widget should create a label widget for its label.
|
void |
refresh() |
Refresh the widgets.
|
protected abstract void |
setEnabled(boolean isEnabled) |
Sets the enablement of the widget.
|
protected void |
setLabelFontStyle() |
Set label font style.
|
protected void |
unlocked() |
Sets the appearance and behavior of the widget in order to indicate that the semantic element used by the widget
is currently unlocked.
|
getValidationControl
protected static final int VALIDATION_MARKER_OFFSET
protected org.eclipse.sirius.common.interpreter.api.IVariableManager variableManager
protected org.eclipse.sirius.common.interpreter.api.IInterpreter interpreter
protected EditingContextAdapter editingContextAdapter
protected org.eclipse.swt.custom.StyledText label
protected org.eclipse.swt.custom.CLabel help
public AbstractEEFWidgetLifecycleManager(org.eclipse.sirius.common.interpreter.api.IVariableManager variableManager, org.eclipse.sirius.common.interpreter.api.IInterpreter interpreter, EditingContextAdapter editingContextAdapter)
variableManager
- The variable managerinterpreter
- The interpretereditingContextAdapter
- The editing context adapterpublic void createControl(org.eclipse.swt.widgets.Composite parent, IEEFFormContainer formContainer)
createControl
in interface IEEFLifecycleManager
createControl
in class AbstractEEFLifecycleManager
parent
- The composite parentformContainer
- The form containerAbstractEEFLifecycleManager.createControl(org.eclipse.swt.widgets.Composite,
org.eclipse.eef.common.ui.api.IEEFFormContainer)
protected boolean needSeparatedLabel()
true
if a label should be created, false
otherwise.protected int getLabelVerticalAlignment()
protected abstract IEEFWidgetController getController()
getController
in class AbstractEEFLifecycleManager
AbstractEEFLifecycleManager.getController()
protected abstract EEFWidgetDescription getWidgetDescription()
protected abstract void createMainControl(org.eclipse.swt.widgets.Composite parent, IEEFFormContainer formContainer)
parent
- The composite parentformContainer
- The form containerpublic void aboutToBeShown()
aboutToBeShown
in interface IEEFLifecycleManager
aboutToBeShown
in class AbstractEEFLifecycleManager
AbstractEEFLifecycleManager.aboutToBeShown()
protected java.lang.Object getWidgetSemanticElement()
protected void lockedByMe()
protected void lockedByOther()
protected void lockedNoWrite()
protected void unlocked()
protected abstract void setEnabled(boolean isEnabled)
isEnabled
- true
when the widget should have its default behavior, false
when the widget
should be in a read only mode.protected boolean isEnabled()
protected void setLabelFontStyle()
protected EEFStyleHelper getEEFStyleHelper()
public void refresh()
refresh
in interface IEEFLifecycleManager
refresh
in class AbstractEEFLifecycleManager
AbstractEEFLifecycleManager.refresh()
public void aboutToBeHidden()
aboutToBeHidden
in interface IEEFLifecycleManager
aboutToBeHidden
in class AbstractEEFLifecycleManager
AbstractEEFLifecycleManager.aboutToBeHidden()
public void dispose()
IEEFLifecycleManager.dispose()
protected org.eclipse.jface.viewers.IStructuredSelection getStructuredSelection(org.eclipse.jface.viewers.StructuredViewer viewer) throws java.lang.ClassCastException
IStructuredSelection
of the specified viewer.
Backport of StructuredViewer.getStructuredSelection()
which was introduced in JFace 3.11 (Mars) to
work with JFace 3.10 (Luna).
viewer
- the viewer.java.lang.ClassCastException
- if the selection of the viewer is not an instance of IStructuredSelection