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 boolean |
isEnabled()
Check if a widget is enabled.
|
protected boolean |
needSeparatedLabel()
Indicates if the widget should create a label widget for its label.
|
protected void |
setLabelFontStyle()
Set label font style.
|
getValidationControl, refresh
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 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 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 void setLabelFontStyle()
protected EEFStyleHelper getEEFStyleHelper()
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 IStructuredSelectionprotected boolean isEnabled()