public class ControlGridSWTRenderer extends AbstractSWTRenderer<VControlGrid>
VControlGrid
.CUSTOM_VARIANT
Constructor and Description |
---|
ControlGridSWTRenderer(VControlGrid vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsRendererFactory rendererFactory)
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.layout.GridData |
createGridDataForControlWithHorizontalGrab(SWTGridDescription swtGridDescription,
SWTGridCell swtGridCell,
org.eclipse.swt.widgets.Control control,
int hSpan)
Creates the
GridData which will be set on control which will take up horizontal space an will span over
the given amount of columns. |
protected org.eclipse.swt.layout.GridData |
createGridDataForControlWithoutHorizontalGrab(SWTGridDescription swtGridDescription,
SWTGridCell swtGridCell,
org.eclipse.swt.widgets.Control control)
Creates the
GridData which will be set on control which will take a span of 1 column an have no
horizontal grab. |
protected void |
dispose()
Disposes all resources used by the renderer.
|
SWTGridDescription |
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.
|
protected int |
getHorizontalSpacing()
Returns the hint for the horizontal spacing.
|
protected EMFFormsRendererFactory |
getRendererFactory()
Returns the
EMFFormsRendererFactory . |
protected org.eclipse.swt.widgets.Control |
renderControl(SWTGridCell cell,
org.eclipse.swt.widgets.Composite parent)
Renders the passed
VElement . |
applyEnable, applyReadOnly, applyValidation, applyValidation, applyVisible, finalizeRendering, getControls, getDefaultFontName, init, postInit, preInit, render, setControlEnabled
checkRenderer, getReportService, getVElement, getViewModelContext
@Inject public ControlGridSWTRenderer(VControlGrid vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsRendererFactory rendererFactory)
vElement
- the view element to be renderedviewContext
- The view model contextreportService
- the ReportService to userendererFactory
- the renderer factory
protected EMFFormsRendererFactory getRendererFactory()
EMFFormsRendererFactory
.public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
AbstractSWTRenderer
getGridDescription
in class AbstractSWTRenderer<VControlGrid>
gridDescription
- the current SWTGridDescription
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
AbstractSWTRenderer
VElement
.renderControl
in class AbstractSWTRenderer<VControlGrid>
cell
- the GridCell
of the control to renderparent
- the Composite
to render onControl
NoRendererFoundException
- this is thrown when a renderer cannot be foundNoPropertyDescriptorFoundExeption
- this is thrown when no property descriptor can be foundprotected int getHorizontalSpacing()
protected org.eclipse.swt.layout.GridData createGridDataForControlWithoutHorizontalGrab(SWTGridDescription swtGridDescription, SWTGridCell swtGridCell, org.eclipse.swt.widgets.Control control)
GridData
which will be set on control which will take a span of 1 column an have no
horizontal grab.swtGridDescription
- the SWTGridDescription
swtGridCell
- the current SWTGridCell
of the descriptioncontrol
- the Control
protected org.eclipse.swt.layout.GridData createGridDataForControlWithHorizontalGrab(SWTGridDescription swtGridDescription, SWTGridCell swtGridCell, org.eclipse.swt.widgets.Control control, int hSpan)
GridData
which will be set on control which will take up horizontal space an will span over
the given amount of columns.swtGridDescription
- the SWTGridDescription
swtGridCell
- the current SWTGridCell
of the descriptioncontrol
- the Control
hSpan
- the horizontal spanprotected void dispose()
AbstractSWTRenderer
dispose
in class AbstractSWTRenderer<VControlGrid>
Copyright © 2017. All rights reserved.