public abstract class AbstractEEFWidgetLifecycleManager extends AbstractEEFLifecycleManager
| Modifier and Type | Field and Description |
|---|---|
protected EditingContextAdapter |
contextAdapter
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 and Description |
|---|
AbstractEEFWidgetLifecycleManager(org.eclipse.sirius.common.interpreter.api.IVariableManager variableManager,
org.eclipse.sirius.common.interpreter.api.IInterpreter interpreter,
EditingContextAdapter contextAdapter)
The constructor.
|
| Modifier and Type | Method and 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.
|
getValidationControlprotected 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 contextAdapter
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 contextAdapter)
variableManager - The variable managerinterpreter - The interpretercontextAdapter - The editing context adapterpublic void createControl(org.eclipse.swt.widgets.Composite parent,
IEEFFormContainer formContainer)
createControl in interface IEEFLifecycleManagercreateControl in class AbstractEEFLifecycleManagerparent - 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 AbstractEEFLifecycleManagerAbstractEEFLifecycleManager.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 IEEFLifecycleManageraboutToBeShown in class AbstractEEFLifecycleManagerAbstractEEFLifecycleManager.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 IEEFLifecycleManagerrefresh in class AbstractEEFLifecycleManagerAbstractEEFLifecycleManager.refresh()public void aboutToBeHidden()
aboutToBeHidden in interface IEEFLifecycleManageraboutToBeHidden in class AbstractEEFLifecycleManagerAbstractEEFLifecycleManager.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