public class EMFFormsDIRendererFactory extends Object implements EMFFormsRendererService<VElement>
EMFFormsDIRendererFactory
provides renderer instances by creating an instance with help of a suitable
EMFFormsDIRendererService
.
It then injects the renderer's required services.NOT_APPLICABLE
Constructor and Description |
---|
EMFFormsDIRendererFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
addEMFFormsDIRendererService(EMFFormsDIRendererService<VElement> diRendererService)
Called by the initializer to add an
EMFFormsDIRendererService . |
AbstractSWTRenderer<VElement> |
getRendererInstance(VElement vElement,
ViewModelContext viewModelContext)
Returns a renderer.
|
protected ReportService |
getReportService()
Returns the
ReportService . |
double |
isApplicable(VElement vElement,
ViewModelContext viewModelContext)
Check whether the provided
VElement can be rendered by the AbstractSWTRenderer provided by
EMFFormsRendererService.getRendererInstance(VElement, ViewModelContext) . |
protected void |
removeEMFFormsDIRendererService(EMFFormsDIRendererService<VElement> diRendererService)
Called by the initializer to remove an
EMFFormsDIRendererService . |
protected void |
setReportService(ReportService reportService)
Called by the initializer to add a
ReportService . |
protected void setReportService(ReportService reportService)
ReportService
.reportService
- The ReportService
to addprotected ReportService getReportService()
ReportService
.ReportService
protected void addEMFFormsDIRendererService(EMFFormsDIRendererService<VElement> diRendererService)
EMFFormsDIRendererService
.diRendererService
- The EMFFormsDIRendererService to addprotected void removeEMFFormsDIRendererService(EMFFormsDIRendererService<VElement> diRendererService)
EMFFormsDIRendererService
.diRendererService
- The EMFFormsDIRendererService to removepublic double isApplicable(VElement vElement, ViewModelContext viewModelContext)
VElement
can be rendered by the AbstractSWTRenderer
provided by
EMFFormsRendererService.getRendererInstance(VElement, ViewModelContext)
.isApplicable
in interface EMFFormsRendererService<VElement>
vElement
- The VElement
to checkviewModelContext
- The ViewModelContext
to use for the renderer instanceEMFFormsRendererService.NOT_APPLICABLE
if the renderer doesn't fit, a positive value otherwiseEMFFormsRendererService.isApplicable(org.eclipse.emf.ecp.view.spi.model.VElement,
org.eclipse.emf.ecp.view.spi.context.ViewModelContext)
public AbstractSWTRenderer<VElement> getRendererInstance(VElement vElement, ViewModelContext viewModelContext)
getRendererInstance
in interface EMFFormsRendererService<VElement>
vElement
- The VElement
to create the renderer instance forviewModelContext
- The ViewModelContext
to use for the renderer instanceEMFFormsRendererService.getRendererInstance(org.eclipse.emf.ecp.view.spi.model.VElement,
org.eclipse.emf.ecp.view.spi.context.ViewModelContext)
Copyright © 2019. All rights reserved.