Class CollapsableGroupSWTRenderer
- 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.collapsable.CollapsableGroupSWTRenderer
-
public class CollapsableGroupSWTRenderer extends ContainerSWTRenderer<VGroup>
A Group renderer, which is collapsable.- Author:
- Eugen Neufeld, jfaltermeier
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description CollapsableGroupSWTRenderer(VGroup vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory factory)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddispose()Disposes all resources used by the renderer.SWTGridDescriptiongetGridDescription(SWTGridDescription gridDescription)Returns the GridDescription for this Renderer.protected voidpostCollapsed()This method gets called after the group has been collapsed.protected voidpostExpanded()This method gets called after the group has been expanded.protected org.eclipse.swt.widgets.ControlrenderControl(SWTGridCell gridCell, org.eclipse.swt.widgets.Composite parent)Renders the passedVElement.-
Methods inherited from class org.eclipse.emf.ecp.view.spi.core.swt.ContainerSWTRenderer
getChildren, getComposite, getCustomVariant, getEMFFormsRendererFactory, getLayout, 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
-
CollapsableGroupSWTRenderer
@Inject public CollapsableGroupSWTRenderer(VGroup vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory factory)
Default constructor.- Parameters:
vElement- the view model element to be renderedviewContext- the view contextreportService- theReportServicefactory- theEMFFormsRendererFactory
-
-
Method Detail
-
getGridDescription
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
Description copied from class:ContainerSWTRendererReturns the GridDescription for this Renderer.- Overrides:
getGridDescriptionin classContainerSWTRenderer<VGroup>- Parameters:
gridDescription- the currentSWTGridDescription- Returns:
- the number of controls per row
- See Also:
AbstractSWTRenderer.getGridDescription(SWTGridDescription)
-
renderControl
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell gridCell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
Renders the passedVElement.- Overrides:
renderControlin classContainerSWTRenderer<VGroup>- Parameters:
gridCell- theGridCellof the control to renderparent- theCompositeto 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)
-
postExpanded
protected void postExpanded()
This method gets called after the group has been expanded. Default implementation does nothing.
-
postCollapsed
protected void postCollapsed()
This method gets called after the group has been collapsed. Default implementation does nothing.
-
dispose
protected void dispose()
Description copied from class:ContainerSWTRendererDisposes all resources used by the renderer. Don't forget to call super.dispose if overwriting this method.- Overrides:
disposein classContainerSWTRenderer<VGroup>- See Also:
AbstractSWTRenderer.dispose()
-
-