Class LabelSWTRenderer
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
-
- org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VLabel>
-
- org.eclipse.emf.ecp.view.spi.label.swt.LabelSWTRenderer
-
- Direct Known Subclasses:
LabelRapRenderer
public class LabelSWTRenderer extends AbstractSWTRenderer<VLabel>
Renders anVLabel
to a SWTLabel
.- Since:
- 1.5
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description LabelSWTRenderer(VLabel vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, VTViewTemplateProvider vtViewTemplateProvider)
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyStyle(org.eclipse.swt.widgets.Label label)
Applies the style defined in the StyleProperty.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, 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
-
LabelSWTRenderer
@Inject public LabelSWTRenderer(VLabel vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, VTViewTemplateProvider vtViewTemplateProvider)
Default Constructor.- Parameters:
vElement
- the view element to be renderedviewContext
- The view model contextreportService
- the ReportService to useemfFormsDatabinding
- the EMFFormsDatabinding to usevtViewTemplateProvider
- the VTViewTemplateProvider to use- Since:
- 1.6
-
-
Method Detail
-
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<VLabel>
- See Also:
AbstractSWTRenderer.dispose()
-
getGridDescription
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.- Specified by:
getGridDescription
in classAbstractSWTRenderer<VLabel>
- 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 cell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
Description copied from class:AbstractSWTRenderer
Renders the passedVElement
.- Specified by:
renderControl
in classAbstractSWTRenderer<VLabel>
- 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
-
applyStyle
protected void applyStyle(org.eclipse.swt.widgets.Label label)
Applies the style defined in the StyleProperty.- Parameters:
label
- theLabel
to apply the styles onto
-
-