Class BooleanControlSWTRenderer
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
-
- org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VCONTROL>
-
- org.eclipse.emf.ecp.view.spi.core.swt.AbstractControlSWTRenderer<VControl>
-
- org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTRenderer
-
- org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTControlSWTRenderer
-
- org.eclipse.emf.ecp.view.internal.core.swt.renderer.BooleanControlSWTRenderer
-
- All Implemented Interfaces:
RootDomainModelChangeListener
public class BooleanControlSWTRenderer extends SimpleControlSWTControlSWTRenderer
- Author:
- Eugen
-
-
Field Summary
-
Fields inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
CUSTOM_VARIANT
-
-
Constructor Summary
Constructors Constructor Description BooleanControlSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.core.databinding.Binding[]
createBindings(org.eclipse.swt.widgets.Control control)
Create theBindings
for this controls.protected SWTGridCell
createControlCell(int column)
Creates the control cell.protected org.eclipse.swt.widgets.Control
createSWTControl(org.eclipse.swt.widgets.Composite parent)
Creates the Control.protected java.lang.String
getUnsetText()
Provide the unset text to show on the label when value is unset.protected void
setValidationColor(org.eclipse.swt.widgets.Control control, org.eclipse.swt.graphics.Color validationColor)
Set the provided validation color as the background for the provided control.-
Methods inherited from class org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTControlSWTRenderer
createControl, getFeature, rootDomainModelChanged, withPreSetValidation
-
Methods inherited from class org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTRenderer
applyReadOnly, applyValidation, createDefaultUnsettableStyleProperty, createLabelCell, createValidationCell, dispose, getGridDescription, getLabelWidth, getUnsettableStyleProperty, isUnsettable, renderControl, setControlEnabled, setControlIdData, setValidationForegroundColor
-
Methods inherited from class org.eclipse.emf.ecp.view.spi.core.swt.AbstractControlSWTRenderer
applyEnable, applyUnchangeableFeature, canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsDatabinding, getEMFFormsLabelProvider, getLabelStyleBits, getModelValue, getValidationBackgroundColor, getValidationBackgroundColor, getValidationForegroundColor, getValidationForegroundColor, getValidationIcon, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, isUnchangeableFeature, notifyChange, postInit, render
-
Methods inherited from class org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer
applyValidation, applyVisible, canReveal, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, isRenderingFinished, preInit, scrollToReveal, scrollToReveal
-
Methods inherited from class org.eclipse.emf.ecp.view.model.common.AbstractRenderer
checkRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register
-
-
-
-
Constructor Detail
-
BooleanControlSWTRenderer
@Inject public BooleanControlSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider)
Default constructor.- Parameters:
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- TheReportService
emfFormsDatabinding
- TheEMFFormsDatabinding
emfFormsLabelProvider
- TheEMFFormsLabelProvider
vtViewTemplateProvider
- TheVTViewTemplateProvider
-
-
Method Detail
-
createControlCell
protected SWTGridCell createControlCell(int column)
Creates the control cell.- Overrides:
createControlCell
in classSimpleControlSWTRenderer
- Parameters:
column
- column number within the grid row- Returns:
- created and configured label cell
- See Also:
SimpleControlSWTRenderer.createControlCell(int)
-
createBindings
protected org.eclipse.core.databinding.Binding[] createBindings(org.eclipse.swt.widgets.Control control) throws DatabindingFailedException
Description copied from class:SimpleControlSWTControlSWTRenderer
Create theBindings
for this controls.- Specified by:
createBindings
in classSimpleControlSWTControlSWTRenderer
- Parameters:
control
- theControl
to create the binding for- Returns:
- all the bindings created by this renderer
- Throws:
DatabindingFailedException
- if the creation of the bindings fails.
-
createSWTControl
protected org.eclipse.swt.widgets.Control createSWTControl(org.eclipse.swt.widgets.Composite parent)
Description copied from class:SimpleControlSWTControlSWTRenderer
Creates the Control.- Specified by:
createSWTControl
in classSimpleControlSWTControlSWTRenderer
- Parameters:
parent
- theComposite
to use as a parent- Returns:
- the created control
-
setValidationColor
protected void setValidationColor(org.eclipse.swt.widgets.Control control, org.eclipse.swt.graphics.Color validationColor)
Description copied from class:SimpleControlSWTRenderer
Set the provided validation color as the background for the provided control.- Overrides:
setValidationColor
in classSimpleControlSWTRenderer
- Parameters:
control
- the control to set the color onvalidationColor
- the validation color to set
-
getUnsetText
protected java.lang.String getUnsetText()
Provide the unset text to show on the label when value is unset.- Specified by:
getUnsetText
in classSimpleControlSWTRenderer
- Returns:
- the text to show on the unset label
- See Also:
SimpleControlSWTRenderer.getUnsetText()
-
-