public class CompoundControlSWTRenderer extends AbstractSWTRenderer<VCompoundControl>
AbstractSWTRenderer
for the VCompoundControl
view model.CUSTOM_VARIANT
Constructor and Description |
---|
CompoundControlSWTRenderer(VCompoundControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsLabelProvider labelProvider,
EMFFormsRendererFactory rendererFactory,
VTViewTemplateProvider viewTemplateProvider,
EMFFormsDatabindingEMF databindingService)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.widgets.Control |
createControls(org.eclipse.swt.widgets.Composite parent)
Creates the controls composite.
|
protected org.eclipse.swt.widgets.Control |
createControls(org.eclipse.swt.widgets.Composite parent,
int cellsToSkip)
Creates the controls composite.
|
protected org.eclipse.swt.widgets.Control |
createDummyValidationIcon(org.eclipse.swt.widgets.Composite parent)
Creates the validation icon of the first cell of the first child may not be used as the validation icon.
|
protected org.eclipse.swt.widgets.Control |
createLabel(org.eclipse.swt.widgets.Composite parent)
Creates the label composite.
|
protected org.eclipse.swt.widgets.Control |
createValidationIcon(org.eclipse.swt.widgets.Composite parent)
Return the validation cell of the fist child.
|
protected void |
dispose()
Disposes all resources used by the renderer.
|
protected org.eclipse.swt.widgets.Layout |
getColumnLayout(int numColumns,
boolean equalWidth)
For testing purposes.
|
protected org.eclipse.core.databinding.DataBindingContext |
getDataBindingContext()
Returns the
DataBindingContext . |
protected EMFFormsDatabindingEMF |
getDatabindingService() |
protected LinkedHashMap<VContainedElement,AbstractSWTRenderer<VElement>> |
getElementRendererMap() |
SWTGridDescription |
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.
|
protected EMFFormsLabelProvider |
getLabelProvider()
Returns the
EMFFormsLabelProvider . |
protected int |
getLabelStyleBits() |
protected Optional<Integer> |
getLabelWidth() |
protected Object |
getLayoutData(SWTGridCell gridCell,
SWTGridDescription controlGridDescription,
SWTGridDescription currentRowGridDescription,
SWTGridDescription fullGridDescription,
VElement vElement,
org.eclipse.emf.ecore.EObject domainModel,
org.eclipse.swt.widgets.Control control)
For testing purposes.
|
protected EMFFormsRendererFactory |
getRendererFactory()
Returns the
EMFFormsRendererFactory . |
protected Object |
getSpanningLayoutData(VContainedElement child,
int spanX,
int spanY)
For testing purposes.
|
protected VTViewTemplateProvider |
getViewTemplateProvider() |
protected void |
initChildRendererMap()
Initialises the child control to renderer map.
|
protected org.eclipse.swt.widgets.Control |
renderControl(SWTGridCell cell,
org.eclipse.swt.widgets.Composite parent)
Renders the passed
VElement . |
protected void |
setFirstControlValidationIconUsed(boolean used)
Whether the first cell of the first child control was used to renderer our validation icon.
|
applyEnable, applyReadOnly, applyValidation, applyValidation, applyVisible, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, postInit, preInit, render, setControlEnabled
checkRenderer, getReportService, getVElement, getViewModelContext
@Inject public CompoundControlSWTRenderer(VCompoundControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsLabelProvider labelProvider, EMFFormsRendererFactory rendererFactory, VTViewTemplateProvider viewTemplateProvider, EMFFormsDatabindingEMF databindingService)
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- the ReportService
labelProvider
- the label provider
rendererFactory
- the renderer factory
viewTemplateProvider
- VTViewTemplateProvider
databindingService
- EMFFormsDatabindingEMF
protected EMFFormsLabelProvider getLabelProvider()
EMFFormsLabelProvider
.protected EMFFormsRendererFactory getRendererFactory()
EMFFormsRendererFactory
.protected EMFFormsDatabindingEMF getDatabindingService()
EMFFormsDatabindingEMF
.protected org.eclipse.core.databinding.DataBindingContext getDataBindingContext()
DataBindingContext
.protected LinkedHashMap<VContainedElement,AbstractSWTRenderer<VElement>> getElementRendererMap()
protected VTViewTemplateProvider getViewTemplateProvider()
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
AbstractSWTRenderer
getGridDescription
in class AbstractSWTRenderer<VCompoundControl>
gridDescription
- the current SWTGridDescription
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
AbstractSWTRenderer
VElement
.renderControl
in class AbstractSWTRenderer<VCompoundControl>
cell
- the GridCell
of the control to renderparent
- the Composite
to render onControl
NoRendererFoundException
- this is thrown when a renderer cannot be foundNoPropertyDescriptorFoundExeption
- this is thrown when no property descriptor can be foundprotected org.eclipse.swt.widgets.Control createLabel(org.eclipse.swt.widgets.Composite parent)
parent
- the parent compositeprotected int getLabelStyleBits()
protected Optional<Integer> getLabelWidth()
protected org.eclipse.swt.widgets.Control createValidationIcon(org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
parent
- the parent to render onNoRendererFoundException
- this is thrown when a renderer cannot be foundNoPropertyDescriptorFoundExeption
- this is thrown when no property descriptor can be foundprotected void setFirstControlValidationIconUsed(boolean used)
used
- true
if used, false
otherwiseprotected org.eclipse.swt.widgets.Control createDummyValidationIcon(org.eclipse.swt.widgets.Composite parent)
parent
- the parentprotected org.eclipse.swt.widgets.Control createControls(org.eclipse.swt.widgets.Composite parent)
parent
- the parent compositeprotected org.eclipse.swt.widgets.Control createControls(org.eclipse.swt.widgets.Composite parent, int cellsToSkip)
parent
- the parent compositecellsToSkip
- number of cells to skipprotected void initChildRendererMap()
protected org.eclipse.swt.widgets.Layout getColumnLayout(int numColumns, boolean equalWidth)
numColumns
- numColumnsequalWidth
- equalWidthprotected Object getSpanningLayoutData(VContainedElement child, int spanX, int spanY)
child
- the element for which the spanning layout is requestedspanX
- spanXspanY
- spanYprotected Object getLayoutData(SWTGridCell gridCell, SWTGridDescription controlGridDescription, SWTGridDescription currentRowGridDescription, SWTGridDescription fullGridDescription, VElement vElement, org.eclipse.emf.ecore.EObject domainModel, org.eclipse.swt.widgets.Control control)
gridCell
- gridCellcontrolGridDescription
- controlGridDescriptioncurrentRowGridDescription
- currentRowGridDescriptionfullGridDescription
- fullGridDescriptionvElement
- vElementdomainModel
- domainModelcontrol
- controlprotected void dispose()
AbstractSWTRenderer
dispose
in class AbstractSWTRenderer<VCompoundControl>
Copyright © 2019. All rights reserved.