Class ExpandBarCategorizationElementRenderer
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
-
- org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VCategorizationElement>
-
- org.eclipse.emfforms.internal.swt.categorization.expandbar.ExpandBarCategorizationElementRenderer
-
public class ExpandBarCategorizationElementRenderer extends AbstractSWTRenderer<VCategorizationElement>
A VCategorizationElement renderer that renders the categories as expandbar items. This renderer does only work if there are only VCategorization items on the root and each VCategorization item contains only VCategory items.- Author:
- Eugen Neufeld
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description ExpandBarCategorizationElementRenderer(VCategorizationElement vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory emfFormsRendererFactory)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyValidation()
Allows implementers to display the validation state of the control.protected org.eclipse.swt.custom.ScrolledComposite
createdEditorPane(org.eclipse.swt.widgets.Composite composite)
Created editor pane.protected void
dispose()
Disposes all resources used by the renderer.SWTGridDescription
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.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, 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
-
ExpandBarCategorizationElementRenderer
@Inject public ExpandBarCategorizationElementRenderer(VCategorizationElement vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory emfFormsRendererFactory)
Default constructor.- Parameters:
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- theReportService
emfFormsRendererFactory
- TheEMFFormsRendererFactory
- Since:
- 1.9
-
-
Method Detail
-
getGridDescription
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.- Specified by:
getGridDescription
in classAbstractSWTRenderer<VCategorizationElement>
- 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<VCategorizationElement>
- 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.swt.widgets.Composite)
-
createdEditorPane
protected org.eclipse.swt.custom.ScrolledComposite createdEditorPane(org.eclipse.swt.widgets.Composite composite)
Created editor pane.- Parameters:
composite
- the composite- Returns:
- the created editor composite
-
applyValidation
protected void applyValidation()
Allows implementers to display the validation state of the control. The default implementation does nothing.- Overrides:
applyValidation
in classAbstractSWTRenderer<VCategorizationElement>
- See Also:
AbstractSWTRenderer.applyValidation()
-
dispose
protected void dispose()
Description copied from class:AbstractSWTRenderer
Disposes all resources used by the renderer. Don't forget to call super.dispose if overwriting this method.- Overrides:
dispose
in classAbstractSWTRenderer<VCategorizationElement>
-
-