Class AbstractSWTTabRenderer<VELEMENT extends VElement>
- 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.categorization.swt.AbstractSWTTabRenderer<VELEMENT>
-
- Type Parameters:
VELEMENT
- theVElement
- Direct Known Subclasses:
CategorizationElementTabbedSWTRenderer
,CompositeCategorySWTTabRenderer
public abstract class AbstractSWTTabRenderer<VELEMENT extends VElement> extends AbstractSWTRenderer<VELEMENT>
Abstract class for a tab renderer.- Author:
- Eugen Neufeld
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description AbstractSWTTabRenderer(VELEMENT vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory emfFormsRendererFactory, VTViewTemplateProvider viewTemplateProvider)
Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
applyValidation()
Allows implementers to display the validation state of the control.protected void
dispose()
Disposes all resources used by the renderer.protected abstract org.eclipse.emf.common.util.EList<VAbstractCategorization>
getCategorizations()
The list of categorizations to display in the tree.SWTGridDescription
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.protected VTViewTemplateProvider
getViewTemplateProvider()
Returns the view template provider.protected void
itemSelected(org.eclipse.swt.custom.CTabItem selection)
This method gets called when a tab item was selected.protected org.eclipse.swt.widgets.Control
renderControl(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent)
Renders the passedVElement
.protected boolean
renderLazy()
Whether to render all tab items immediately or on selection.boolean
showCategorization(VAbstractCategorization categorization)
Reveal the control that renders the givencategorization
.protected boolean
useScrolledContent()
Whether aScrolledComposite
should be used as the item's content or not.-
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
-
AbstractSWTTabRenderer
public AbstractSWTTabRenderer(VELEMENT vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory emfFormsRendererFactory, VTViewTemplateProvider viewTemplateProvider)
Default constructor.- Parameters:
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- theReportService
emfFormsRendererFactory
- TheEMFFormsRendererFactory
viewTemplateProvider
- theVTViewTemplateProvider
- Since:
- 1.8
-
-
Method Detail
-
getViewTemplateProvider
protected final VTViewTemplateProvider getViewTemplateProvider()
Returns the view template provider.- Returns:
- the
VTViewTemplateProvider
- Since:
- 1.8
-
getGridDescription
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
Description copied from class:AbstractSWTRenderer
Returns the GridDescription for this Renderer.- Specified by:
getGridDescription
in classAbstractSWTRenderer<VELEMENT extends VElement>
- Parameters:
gridDescription
- the currentSWTGridDescription
- Returns:
- the number of controls per row
-
renderControl
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
Description copied from class:AbstractSWTRenderer
Renders the passedVElement
.- Specified by:
renderControl
in classAbstractSWTRenderer<VELEMENT extends VElement>
- 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
-
itemSelected
protected final void itemSelected(org.eclipse.swt.custom.CTabItem selection)
This method gets called when a tab item was selected. Subclasses may call this method when programmatic selection changes have been made.- Parameters:
selection
- the selected item- Since:
- 1.9
-
useScrolledContent
protected boolean useScrolledContent()
Whether aScrolledComposite
should be used as the item's content or not.- Returns:
true
if pane should be scrollable,false
otherwise- Since:
- 1.9
-
renderLazy
protected boolean renderLazy()
Whether to render all tab items immediately or on selection.- Returns:
true
if the item UI will be rendered on first selection,false
if all items will be rendered immediately- Since:
- 1.9
-
getCategorizations
protected abstract org.eclipse.emf.common.util.EList<VAbstractCategorization> getCategorizations()
The list of categorizations to display in the tree.- Returns:
- the list of
VAbstractCategorization
-
applyValidation
protected void applyValidation()
Description copied from class:AbstractSWTRenderer
Allows implementers to display the validation state of the control. The default implementation does nothing.- Overrides:
applyValidation
in classAbstractSWTRenderer<VELEMENT extends VElement>
-
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<VELEMENT extends VElement>
- See Also:
AbstractSWTRenderer.dispose()
-
showCategorization
public boolean showCategorization(VAbstractCategorization categorization)
Reveal the control that renders the givencategorization
.- Parameters:
categorization
- a categorization to reveal- Returns:
- whether the
categorization
was successfully revealed - Since:
- 1.22
-
-