VELEMENT
- the VElement
of the rendererpublic abstract class ContainerSWTRenderer<VELEMENT extends VElement> extends AbstractSWTRenderer<VELEMENT>
ContainerSWTRenderer
is a super class for all Renderer which renders its contents vertically.CUSTOM_VARIANT
Constructor and Description |
---|
ContainerSWTRenderer(VELEMENT vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsRendererFactory factory,
EMFFormsDatabinding emfFormsDatabinding)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
dispose()
Disposes all resources used by the renderer.
|
protected Collection<VContainedElement> |
getChildren()
The collection of children to iterate over.
|
protected org.eclipse.swt.widgets.Composite |
getComposite(org.eclipse.swt.widgets.Composite parent)
Allows to customize the composite which is used to render the children onto.
|
protected String |
getCustomVariant()
The custom variant to set for styling.
|
protected EMFFormsRendererFactory |
getEMFFormsRendererFactory()
The
EMFFormsRendererFactory to use. |
SWTGridDescription |
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.
|
protected org.eclipse.swt.widgets.Layout |
getLayout(int numControls,
boolean equalWidth)
Returns the layout to use.
|
protected org.eclipse.swt.widgets.Control |
renderControl(SWTGridCell gridCell,
org.eclipse.swt.widgets.Composite parent)
Renders the passed
VElement . |
protected void |
setLayoutDataForControl(SWTGridCell gridCell,
SWTGridDescription gridDescription,
SWTGridDescription currentRowGridDescription,
SWTGridDescription fullGridDescription,
VElement vElement,
org.eclipse.swt.widgets.Control control)
Sets the LayoutData for the specified control.
|
applyEnable, applyReadOnly, applyValidation, applyVisible, finalizeRendering, getControls, getDefaultFontName, init, postInit, preInit, render, setControlEnabled
checkRenderer, getReportService, getVElement, getViewModelContext
public ContainerSWTRenderer(VELEMENT vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory factory, EMFFormsDatabinding emfFormsDatabinding)
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- the ReportService
factory
- the EMFFormsRendererFactory
emfFormsDatabinding
- The EMFFormsDatabinding
protected final EMFFormsRendererFactory getEMFFormsRendererFactory()
EMFFormsRendererFactory
to use.EMFFormsRendererFactory
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
getGridDescription
in class AbstractSWTRenderer<VELEMENT extends VElement>
gridDescription
- the current SWTGridDescription
AbstractSWTRenderer.getGridDescription(SWTGridDescription)
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell gridCell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
VElement
.renderControl
in class AbstractSWTRenderer<VELEMENT extends VElement>
gridCell
- 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 foundorg.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer#renderControl(int, org.eclipse.swt.widgets.Composite,
org.eclipse.emf.ecp.view.spi.model.VElement, org.eclipse.emf.ecp.view.spi.context.ViewModelContext)
protected String getCustomVariant()
protected Collection<VContainedElement> getChildren()
protected org.eclipse.swt.widgets.Composite getComposite(org.eclipse.swt.widgets.Composite parent)
parent
- the parent Composite
to use as a parentComposite
or a subclass to useprotected org.eclipse.swt.widgets.Layout getLayout(int numControls, boolean equalWidth)
numControls
- number of columns to createequalWidth
- whether the columns should be equalLayout
protected void setLayoutDataForControl(SWTGridCell gridCell, SWTGridDescription gridDescription, SWTGridDescription currentRowGridDescription, SWTGridDescription fullGridDescription, VElement vElement, org.eclipse.swt.widgets.Control control)
gridCell
- the GridCell
used to render the controlgridDescription
- the GridDescription
of the parent which rendered the controlcurrentRowGridDescription
- the GridDescription
of the current rowfullGridDescription
- the GridDescription
of the whole containervElement
- the VElement
to set the layoutData forcontrol
- the control to set the layout toprotected void dispose()
dispose
in class AbstractSWTRenderer<VELEMENT extends VElement>
AbstractSWTRenderer.dispose()
Copyright © 2016. All rights reserved.