Class SimpleControlSWTControlSWTRenderer
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
-
- org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VCONTROL>
-
- org.eclipse.emf.ecp.view.spi.core.swt.AbstractControlSWTRenderer<VControl>
-
- org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTRenderer
-
- org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTControlSWTRenderer
-
- All Implemented Interfaces:
RootDomainModelChangeListener
- Direct Known Subclasses:
AttributeValueControlSWTRenderer
,BooleanControlSWTRenderer
,ControlRootEClassControl2SWTRenderer
,DateTimeControlSWTRenderer
,DomainModelReferenceControlSWTRenderer
,ECPLegacyControlSWTRenderer
,EEnumLiteralRenderer
,EReferenceLabelControlSWTRenderer
,ExpectedValueControlRenderer
,HexColorSelectionControlSWTRenderer
,LinkControlSWTRenderer
,TableDetailViewControlSWTRenderer
,TextControlSWTRenderer
,URLSelectionControlSWTRenderer
public abstract class SimpleControlSWTControlSWTRenderer extends SimpleControlSWTRenderer
Renderer forControls
.- Author:
- Eugen Neufeld
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description SimpleControlSWTControlSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider)
Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.eclipse.core.databinding.Binding[]
createBindings(org.eclipse.swt.widgets.Control control)
Create theBindings
for this controls.protected org.eclipse.swt.widgets.Control
createControl(org.eclipse.swt.widgets.Composite parent)
Creates the control itself.protected abstract org.eclipse.swt.widgets.Control
createSWTControl(org.eclipse.swt.widgets.Composite parent)
Creates the Control.protected org.eclipse.emf.ecore.EStructuralFeature
getFeature()
Retrieves the associatedEStructuralFeature
of this renderer.protected void
rootDomainModelChanged()
This method is called inAbstractControlSWTRenderer.notifyChange()
when the root domain model of the view model context changes.protected org.eclipse.core.databinding.UpdateValueStrategy
withPreSetValidation(org.eclipse.core.databinding.UpdateValueStrategy delegate)
Create aPreSetValidationStrategy
.-
Methods inherited from class org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTRenderer
applyReadOnly, applyValidation, createControlCell, createDefaultUnsettableStyleProperty, createLabelCell, createValidationCell, dispose, getGridDescription, getLabelWidth, getUnsettableStyleProperty, getUnsetText, isUnsettable, renderControl, setControlEnabled, setControlIdData, setValidationColor, setValidationForegroundColor
-
Methods inherited from class org.eclipse.emf.ecp.view.spi.core.swt.AbstractControlSWTRenderer
applyEnable, applyUnchangeableFeature, canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsDatabinding, getEMFFormsLabelProvider, getLabelStyleBits, getModelValue, getValidationBackgroundColor, getValidationBackgroundColor, getValidationForegroundColor, getValidationForegroundColor, getValidationIcon, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, isUnchangeableFeature, notifyChange, postInit, render
-
Methods inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
applyValidation, applyVisible, canReveal, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, isRenderingFinished, preInit, scrollToReveal, scrollToReveal
-
Methods inherited from class org.eclipse.emf.ecp.view.model.common.AbstractRenderer
checkRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register
-
-
-
-
Constructor Detail
-
SimpleControlSWTControlSWTRenderer
public SimpleControlSWTControlSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider)
Default constructor.- Parameters:
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- TheReportService
emfFormsDatabinding
- TheEMFFormsDatabinding
emfFormsLabelProvider
- TheEMFFormsLabelProvider
vtViewTemplateProvider
- TheVTViewTemplateProvider
- Since:
- 1.6
-
-
Method Detail
-
createControl
protected final org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent) throws DatabindingFailedException
Creates the control itself.- Specified by:
createControl
in classSimpleControlSWTRenderer
- Parameters:
parent
- theComposite
to render onto- Returns:
- the rendered control
- Throws:
DatabindingFailedException
- if the databinding of the control fails
-
rootDomainModelChanged
protected void rootDomainModelChanged() throws DatabindingFailedException
This method is called inAbstractControlSWTRenderer.notifyChange()
when the root domain model of the view model context changes.- Overrides:
rootDomainModelChanged
in classSimpleControlSWTRenderer
- Throws:
DatabindingFailedException
- If the databinding failed- See Also:
AbstractControlSWTRenderer.rootDomainModelChanged()
-
withPreSetValidation
protected org.eclipse.core.databinding.UpdateValueStrategy withPreSetValidation(org.eclipse.core.databinding.UpdateValueStrategy delegate) throws DatabindingFailedException
Create aPreSetValidationStrategy
.- Parameters:
delegate
- a delegateUpdateValueStrategy
- Returns:
- a
PreSetValidationStrategy
- Throws:
DatabindingFailedException
- in case the necessary feature can not be obtained- Since:
- 1.13
-
getFeature
protected org.eclipse.emf.ecore.EStructuralFeature getFeature() throws DatabindingFailedException
Retrieves the associatedEStructuralFeature
of this renderer.- Returns:
- the feature
- Throws:
DatabindingFailedException
- in case the necessary feature can not be obtained- Since:
- 1.13
-
createBindings
protected abstract org.eclipse.core.databinding.Binding[] createBindings(org.eclipse.swt.widgets.Control control) throws DatabindingFailedException
Create theBindings
for this controls.- Parameters:
control
- theControl
to create the binding for- Returns:
- all the bindings created by this renderer
- Throws:
DatabindingFailedException
- if the creation of the bindings fails.- Since:
- 1.6
-
createSWTControl
protected abstract org.eclipse.swt.widgets.Control createSWTControl(org.eclipse.swt.widgets.Composite parent) throws DatabindingFailedException
Creates the Control.- Parameters:
parent
- theComposite
to use as a parent- Returns:
- the created control
- Throws:
DatabindingFailedException
- if the creation of the control fails due to databinding problems- Since:
- 1.6
-
-