Class EmbeddedGroupSWTRenderer
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
-
- org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VGroup>
-
- org.eclipse.emf.ecp.view.alignmentgroup.internal.swt.EmbeddedGroupSWTRenderer
-
public class EmbeddedGroupSWTRenderer extends AbstractSWTRenderer<VGroup>
A Group renderer, which doesn't enforce its own layout.- Author:
- Eugen Neufeld
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description EmbeddedGroupSWTRenderer(VGroup vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory rendererFactory)
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.swt.widgets.Control
createHeadingControl(org.eclipse.swt.widgets.Composite parent)
Creates the control, which is used as a heading for the embedded group.protected void
dispose()
Disposes all resources used by the renderer.SWTGridDescription
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.protected org.eclipse.swt.widgets.Control
renderControl(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent)
Renders the passedVElement
.-
Methods inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
applyEnable, applyReadOnly, applyValidation, applyValidation, applyVisible, canReveal, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, isRenderingFinished, postInit, preInit, render, scrollToReveal, scrollToReveal, setControlEnabled
-
Methods inherited from class org.eclipse.emf.ecp.view.model.common.AbstractRenderer
checkRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register
-
-
-
-
Constructor Detail
-
EmbeddedGroupSWTRenderer
@Inject public EmbeddedGroupSWTRenderer(VGroup vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory rendererFactory)
Default Constructor.- Parameters:
vElement
- the view element to be renderedviewContext
- The view model contextreportService
- the ReportService to userendererFactory
- the EMFFormsRendererFactory to use
-
-
Method Detail
-
getGridDescription
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
Description copied from class:AbstractSWTRenderer
Returns the GridDescription for this Renderer.- Specified by:
getGridDescription
in classAbstractSWTRenderer<VGroup>
- Parameters:
gridDescription
- the currentSWTGridDescription
- Returns:
- the number of controls per row
-
renderControl
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
Renders the passedVElement
.- Specified by:
renderControl
in classAbstractSWTRenderer<VGroup>
- Parameters:
cell
- theGridCell
of the control to renderparent
- theComposite
to render on- Returns:
- the rendered
Control
- Throws:
NoRendererFoundException
- this is thrown when a renderer cannot be foundNoPropertyDescriptorFoundExeption
- this is thrown when no property descriptor can be found- See Also:
org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer#renderControl(org.eclipse.emfforms.spi.swt.core.layout.GridCell, org.eclipse.swt.widgets.Composite)
-
createHeadingControl
protected org.eclipse.swt.widgets.Control createHeadingControl(org.eclipse.swt.widgets.Composite parent)
Creates the control, which is used as a heading for the embedded group.- Parameters:
parent
- The parent to render the heading control on- Returns:
- the heading
Control
-
dispose
protected void dispose()
Description copied from class:AbstractSWTRenderer
Disposes all resources used by the renderer. Don't forget to call super.dispose if overwriting this method.- Overrides:
dispose
in classAbstractSWTRenderer<VGroup>
-
-