Class LinkOnlyMultiReferenceRendererService
- java.lang.Object
-
- org.eclipse.emf.ecp.view.internal.control.multireference.LinkOnlyMultiReferenceRendererService
-
- All Implemented Interfaces:
EMFFormsDIRendererService<VControl>
public class LinkOnlyMultiReferenceRendererService extends java.lang.Object implements EMFFormsDIRendererService<VControl>
Provides theLinkOnlyMultiReferenceRenderer
for multi references. The renderer is only used if the corresponding control specifies an annotation with key "hideAddNewButton".- Author:
- Martin Fleck, Lucas Koehler
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ANNOTATION_KEY
The annotation key specifying that this renderer is applicable for a multi reference.-
Fields inherited from interface org.eclipse.emfforms.spi.swt.core.di.EMFFormsDIRendererService
NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description LinkOnlyMultiReferenceRendererService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends AbstractSWTRenderer<VControl>>
getRendererClass()
Returns theClass
for the renderer of this service.double
isApplicable(VElement vElement, ViewModelContext viewModelContext)
Check whether the providedVElement
can be rendered by the renderer defined byEMFFormsDIRendererService.getRendererClass()
.protected void
setEMFFormsDatabinding(EMFFormsDatabinding databindingService)
Called by the initializer to set the EMFFormsDatabinding.protected void
setReportService(ReportService reportService)
Called by the initializer to set the ReportService.
-
-
-
Field Detail
-
ANNOTATION_KEY
public static final java.lang.String ANNOTATION_KEY
The annotation key specifying that this renderer is applicable for a multi reference.- See Also:
- Constant Field Values
-
-
Method Detail
-
setEMFFormsDatabinding
protected void setEMFFormsDatabinding(EMFFormsDatabinding databindingService)
Called by the initializer to set the EMFFormsDatabinding.- Parameters:
databindingService
- The EMFFormsDatabinding
-
setReportService
protected void setReportService(ReportService reportService)
Called by the initializer to set the ReportService.- Parameters:
reportService
- The ReportService
-
isApplicable
public double isApplicable(VElement vElement, ViewModelContext viewModelContext)
Description copied from interface:EMFFormsDIRendererService
Check whether the providedVElement
can be rendered by the renderer defined byEMFFormsDIRendererService.getRendererClass()
.- Specified by:
isApplicable
in interfaceEMFFormsDIRendererService<VControl>
- Parameters:
vElement
- TheVElement
to checkviewModelContext
- TheViewModelContext
to use for the renderer- Returns:
EMFFormsDIRendererService.NOT_APPLICABLE
if the renderer doesn't fit, a positive value otherwise
-
getRendererClass
public java.lang.Class<? extends AbstractSWTRenderer<VControl>> getRendererClass()
Description copied from interface:EMFFormsDIRendererService
Returns theClass
for the renderer of this service.- Specified by:
getRendererClass
in interfaceEMFFormsDIRendererService<VControl>
- Returns:
- the
Class
-
-