Class SWTStackLayoutRenderer
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
-
- org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VStackLayout>
-
- org.eclipse.emf.ecp.view.spi.stack.ui.swt.SWTStackLayoutRenderer
-
- All Implemented Interfaces:
RootDomainModelChangeListener
public class SWTStackLayoutRenderer extends AbstractSWTRenderer<VStackLayout> implements RootDomainModelChangeListener
The SWTVStackLayout
renderer.- Author:
- jfaltermeier
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description SWTStackLayoutRenderer(VStackLayout vElement, ViewModelContext viewContext, ReportService reportService)
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.SWTGridDescription
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.void
notifyChange()
Notifies this listener that the domain model of theEMFFormsViewContext
has changed.protected void
postInit()
Use this method to initialize objects which are needed during rendering.protected void
preInit()
Use this method to initialize objects which are needed already before rendering.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, render, scrollToReveal, scrollToReveal, setControlEnabled
-
Methods inherited from class org.eclipse.emf.ecp.view.model.common.AbstractRenderer
checkRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register
-
-
-
-
Constructor Detail
-
SWTStackLayoutRenderer
@Inject public SWTStackLayoutRenderer(VStackLayout vElement, ViewModelContext viewContext, ReportService reportService)
Default constructor.- Parameters:
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- theReportService
- Since:
- 1.6
-
-
Method Detail
-
getGridDescription
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.- Specified by:
getGridDescription
in classAbstractSWTRenderer<VStackLayout>
- Parameters:
gridDescription
- the currentSWTGridDescription
- Returns:
- the number of controls per row
- See Also:
AbstractSWTRenderer.getGridDescription(org.eclipse.emfforms.spi.swt.core.layout.SWTGridDescription)
-
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<VStackLayout>
- 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:
AbstractSWTRenderer.renderControl(org.eclipse.emfforms.spi.swt.core.layout.SWTGridCell, org.eclipse.emf.ecp.view.spi.swt.Composite)
-
preInit
protected void preInit()
Use this method to initialize objects which are needed already before rendering.- Overrides:
preInit
in classAbstractSWTRenderer<VStackLayout>
- See Also:
AbstractSWTRenderer.preInit()
-
postInit
protected void postInit()
Use this method to initialize objects which are needed during rendering.- Overrides:
postInit
in classAbstractSWTRenderer<VStackLayout>
- See Also:
AbstractSWTRenderer.postInit()
-
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 classAbstractSWTRenderer<VStackLayout>
- See Also:
AbstractSWTRenderer.dispose()
-
notifyChange
public void notifyChange()
Notifies this listener that the domain model of theEMFFormsViewContext
has changed.- Specified by:
notifyChange
in interfaceRootDomainModelChangeListener
- Since:
- 1.9
- See Also:
RootDomainModelChangeListener.notifyChange()
-
-