Class PGroupRenderer
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
-
- org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VELEMENT>
-
- org.eclipse.emf.ecp.view.spi.core.swt.ContainerSWTRenderer<VGroup>
-
- org.eclipse.emf.ecp.view.group.swt.internal.collapsible.pgroup.PGroupRenderer
-
public class PGroupRenderer extends ContainerSWTRenderer<VGroup>
Renderer for a collapsibleVGroup
usingPGroup
from Nebula.- Author:
- jfaltermeier
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description PGroupRenderer(VGroup vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory factory)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<VContainedElement>
getChildren()
The collection of children to iterate over.protected java.lang.String
getCustomVariant()
The custom variant to set for styling.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 passedVElement
.-
Methods inherited from class org.eclipse.emf.ecp.view.spi.core.swt.ContainerSWTRenderer
dispose, getComposite, getEMFFormsRendererFactory, setLayoutDataForControl
-
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
-
PGroupRenderer
@Inject public PGroupRenderer(VGroup vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory factory)
Default constructor.- Parameters:
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- theReportService
factory
- theEMFFormsRendererFactory
-
-
Method Detail
-
getChildren
protected java.util.Collection<VContainedElement> getChildren()
Description copied from class:ContainerSWTRenderer
The collection of children to iterate over.- Overrides:
getChildren
in classContainerSWTRenderer<VGroup>
- Returns:
- the collection of children to render
-
getCustomVariant
protected java.lang.String getCustomVariant()
Description copied from class:ContainerSWTRenderer
The custom variant to set for styling.- Overrides:
getCustomVariant
in classContainerSWTRenderer<VGroup>
- Returns:
- the string used by rap for styling
-
renderControl
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell gridCell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
Renders the passedVElement
.- Overrides:
renderControl
in classContainerSWTRenderer<VGroup>
- Parameters:
gridCell
- 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:
ContainerSWTRenderer.renderControl(org.eclipse.emfforms.spi.swt.core.layout.SWTGridCell, org.eclipse.swt.widgets.Composite)
-
getLayout
protected org.eclipse.swt.widgets.Layout getLayout(int numControls, boolean equalWidth)
Description copied from class:ContainerSWTRenderer
Returns the layout to use.- Overrides:
getLayout
in classContainerSWTRenderer<VGroup>
- Parameters:
numControls
- number of columns to createequalWidth
- whether the columns should be equal- Returns:
- the
Layout
-
getGridDescription
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
Description copied from class:ContainerSWTRenderer
Returns the GridDescription for this Renderer.- Overrides:
getGridDescription
in classContainerSWTRenderer<VGroup>
- Parameters:
gridDescription
- the currentSWTGridDescription
- Returns:
- the number of controls per row
- See Also:
AbstractSWTRenderer.getGridDescription(SWTGridDescription)
-
-