Class GroupSWTRenderer
- 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.spi.group.swt.GroupSWTRenderer
-
public class GroupSWTRenderer extends ContainerSWTRenderer<VGroup>
Renders a SWT group.- Since:
- 1.5
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description GroupSWTRenderer(VGroup vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory factory)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dispose()
Disposes all resources used by the renderer.protected java.util.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 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.-
Methods inherited from class org.eclipse.emf.ecp.view.spi.core.swt.ContainerSWTRenderer
getEMFFormsRendererFactory, renderControl, 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
-
GroupSWTRenderer
@Inject public GroupSWTRenderer(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
- Since:
- 1.6
-
-
Method Detail
-
getCustomVariant
protected java.lang.String getCustomVariant()
The custom variant to set for styling.- Overrides:
getCustomVariant
in classContainerSWTRenderer<VGroup>
- Returns:
- the string used by rap for styling
- See Also:
ContainerSWTRenderer.getCustomVariant()
-
getChildren
protected java.util.Collection<VContainedElement> getChildren()
The collection of children to iterate over.- Overrides:
getChildren
in classContainerSWTRenderer<VGroup>
- Returns:
- the collection of children to render
- See Also:
ContainerSWTRenderer.getChildren()
-
getComposite
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.- Overrides:
getComposite
in classContainerSWTRenderer<VGroup>
- Parameters:
parent
- the parentComposite
to use as a parent- Returns:
- the
Composite
or a subclass to use - See Also:
ContainerSWTRenderer.getComposite(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)
-
dispose
protected void dispose()
Disposes all resources used by the renderer. Don't forget to call super.dispose if overwriting this method.- Overrides:
dispose
in classContainerSWTRenderer<VGroup>
- See Also:
ContainerSWTRenderer.dispose()
-
-