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)
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 |
createLabel(org.eclipse.swt.widgets.Composite parent)
Creates the label composite.
|
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 . |
SWTGridDescription |
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.
|
protected EMFFormsLabelProvider |
getLabelProvider()
Returns the
EMFFormsLabelProvider . |
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 org.eclipse.swt.widgets.Control |
renderControl(SWTGridCell cell,
org.eclipse.swt.widgets.Composite parent)
Renders the passed
VElement . |
applyEnable, applyReadOnly, applyValidation, applyVisible, finalizeRendering, getControls, getDefaultFontName, init, postInit, preInit, render, setControlEnabled
checkRenderer, getReportService, getVElement, getViewModelContext
@Inject public CompoundControlSWTRenderer(VCompoundControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsLabelProvider labelProvider, EMFFormsRendererFactory rendererFactory)
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- the ReportService
labelProvider
- the label provider
rendererFactory
- the renderer factory
protected EMFFormsLabelProvider getLabelProvider()
EMFFormsLabelProvider
.protected EMFFormsRendererFactory getRendererFactory()
EMFFormsRendererFactory
.protected org.eclipse.core.databinding.DataBindingContext getDataBindingContext()
DataBindingContext
.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 org.eclipse.swt.widgets.Control createControls(org.eclipse.swt.widgets.Composite parent)
parent
- the parent compositeprotected 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 © 2016. All rights reserved.