Class SectionNodeSWTRenderer
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
-
- org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VSection>
-
- org.eclipse.emf.ecp.view.spi.section.swt.AbstractSectionSWTRenderer
-
- org.eclipse.emf.ecp.view.spi.section.swt.SectionNodeSWTRenderer
-
public class SectionNodeSWTRenderer extends AbstractSectionSWTRenderer
Renderer forVSection
with child items.- Author:
- jfaltermeier
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description SectionNodeSWTRenderer(VSection vElement, ViewModelContext viewContext, ReportService reportService, VTViewTemplateProvider viewTemplateProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
adjustLayoutData(boolean vis)
Adjusts the visibility for all gridcells based on the collapse state.protected void
applyEnable()
Allows implementers to set a control to enabled.protected org.eclipse.swt.widgets.Control
createFirstColumn(org.eclipse.swt.widgets.Composite parent)
Renders the first column.protected void
dispose()
Disposes all resources used by the renderer.protected org.eclipse.ui.forms.widgets.ExpandableComposite
getExpandableComposite()
SWTGridDescription
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.protected void
initCollapseState()
Called by theVSectionedArea
when all children have been renderered.protected void
preInit()
Use this method to initialize objects which are needed already before rendering.protected void
setExpandableComposite(org.eclipse.ui.forms.widgets.ExpandableComposite expandableComposite)
-
Methods inherited from class org.eclipse.emf.ecp.view.spi.section.swt.AbstractSectionSWTRenderer
computeLeftMargin, getDataBindingContext, getEMFFormsRendererFactory, getLabelWidth, getViewTemplateProvider, renderControl
-
Methods inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
applyReadOnly, applyValidation, applyValidation, applyVisible, canReveal, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, isRenderingFinished, postInit, render, scrollToReveal, scrollToReveal, setControlEnabled
-
Methods inherited from class org.eclipse.emf.ecp.view.model.common.AbstractRenderer
checkRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register
-
-
-
-
Constructor Detail
-
SectionNodeSWTRenderer
@Inject public SectionNodeSWTRenderer(VSection vElement, ViewModelContext viewContext, ReportService reportService, VTViewTemplateProvider viewTemplateProvider)
- Parameters:
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- theReportService
viewTemplateProvider
- theVTViewTemplateProvider
- Since:
- 1.18
-
-
Method Detail
-
preInit
protected void preInit()
Description copied from class:AbstractSWTRenderer
Use this method to initialize objects which are needed already before rendering.- Overrides:
preInit
in classAbstractSWTRenderer<VSection>
-
getGridDescription
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
Description copied from class:AbstractSWTRenderer
Returns the GridDescription for this Renderer.- Specified by:
getGridDescription
in classAbstractSWTRenderer<VSection>
- Parameters:
gridDescription
- the currentSWTGridDescription
- Returns:
- the number of controls per row
-
createFirstColumn
protected org.eclipse.swt.widgets.Control createFirstColumn(org.eclipse.swt.widgets.Composite parent)
Description copied from class:AbstractSectionSWTRenderer
Renders the first column.- Specified by:
createFirstColumn
in classAbstractSectionSWTRenderer
- Parameters:
parent
- the parent composite- Returns:
- the rendered control
-
adjustLayoutData
protected void adjustLayoutData(boolean vis)
Description copied from class:AbstractSectionSWTRenderer
Adjusts the visibility for all gridcells based on the collapse state.- Overrides:
adjustLayoutData
in classAbstractSectionSWTRenderer
- Parameters:
vis
- the collapse state
-
applyEnable
protected void applyEnable()
Description copied from class:AbstractSWTRenderer
Allows implementers to set a control to enabled.- Overrides:
applyEnable
in classAbstractSWTRenderer<VSection>
-
dispose
protected void dispose()
Description copied from class:AbstractSectionSWTRenderer
Disposes all resources used by the renderer. Don't forget to call super.dispose if overwriting this method.- Overrides:
dispose
in classAbstractSectionSWTRenderer
- See Also:
AbstractSWTRenderer.dispose()
-
initCollapseState
protected void initCollapseState()
Called by theVSectionedArea
when all children have been renderered. Initialises the collapse state based onVSection.isCollapsed()
.- Specified by:
initCollapseState
in classAbstractSectionSWTRenderer
- Since:
- 1.6
- See Also:
AbstractSectionSWTRenderer.initCollapseState()
-
getExpandableComposite
protected org.eclipse.ui.forms.widgets.ExpandableComposite getExpandableComposite()
- Returns:
- the expandableComposite
- Since:
- 1.13
-
setExpandableComposite
protected void setExpandableComposite(org.eclipse.ui.forms.widgets.ExpandableComposite expandableComposite)
- Parameters:
expandableComposite
- the expandableComposite to set- Since:
- 1.13
-
-