public class DateTimeControlSWTRenderer extends SimpleControlSWTControlSWTRenderer
Date
.CUSTOM_VARIANT
Constructor and Description |
---|
DateTimeControlSWTRenderer(VControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabinding emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
EMFFormsLocalizationService localizationService,
ImageRegistryService imageRegistryService)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyEnable()
Allows implementers to set a control to enabled.
|
protected void |
applyReadOnly()
Marks a controls as readonly.
|
protected org.eclipse.core.databinding.Binding[] |
createBindings(org.eclipse.swt.widgets.Control control)
Create the
Bindings for this controls. |
protected org.eclipse.swt.widgets.Control |
createSWTControl(org.eclipse.swt.widgets.Composite parent)
Creates the Control.
|
protected void |
dispose()
Disposes all resources used by the renderer.
|
protected String |
getUnsetText()
Provide the unset text to show on the label when value is unset.
|
protected void |
rootDomainModelChanged()
This method is called in
AbstractControlSWTRenderer.notifyChange() when the root domain model of the view model context changes. |
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.
|
protected void |
updateButtonEnabling()
Updates the enablement of buttons according to the bound input.
|
protected void |
updateButtonVisibility()
Updates the visibility of buttons according to the bound input.
|
createControl, getFeature, withPreSetValidation
applyValidation, createControlCell, createDefaultUnsettableStyleProperty, createLabelCell, createValidationCell, getGridDescription, getLabelWidth, getUnsettableStyleProperty, isUnsettable, renderControl, setControlEnabled, setControlIdData, setValidationForegroundColor
applyUnchangeableFeature, canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsDatabinding, getEMFFormsLabelProvider, getLabelStyleBits, getModelValue, getValidationBackgroundColor, getValidationForegroundColor, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, isUnchangeableFeature, notifyChange, postInit, render
applyValidation, applyVisible, canReveal, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, isRenderingFinished, preInit, scrollToReveal, scrollToReveal
checkRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register
@Inject public DateTimeControlSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, EMFFormsLocalizationService localizationService, ImageRegistryService imageRegistryService)
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- The ReportService
emfFormsDatabinding
- The EMFFormsDatabinding
emfFormsLabelProvider
- The EMFFormsLabelProvider
vtViewTemplateProvider
- The VTViewTemplateProvider
localizationService
- The EMFFormsLocalizationService
imageRegistryService
- The ImageRegistryService
protected org.eclipse.core.databinding.Binding[] createBindings(org.eclipse.swt.widgets.Control control) throws DatabindingFailedException
SimpleControlSWTControlSWTRenderer
Bindings
for this controls.createBindings
in class SimpleControlSWTControlSWTRenderer
control
- the Control
to create the binding forDatabindingFailedException
- if the creation of the bindings fails.protected void dispose()
dispose
in class SimpleControlSWTRenderer
SimpleControlSWTRenderer.dispose()
protected org.eclipse.swt.widgets.Control createSWTControl(org.eclipse.swt.widgets.Composite parent) throws DatabindingFailedException
SimpleControlSWTControlSWTRenderer
createSWTControl
in class SimpleControlSWTControlSWTRenderer
parent
- the Composite
to use as a parentDatabindingFailedException
- if the creation of the control fails due to databinding problemsprotected void applyReadOnly()
AbstractControlSWTRenderer
applyReadOnly
in class SimpleControlSWTRenderer
AbstractSWTRenderer.applyReadOnly()
protected void applyEnable()
AbstractControlSWTRenderer
applyEnable
in class AbstractControlSWTRenderer<VControl>
AbstractSWTRenderer.applyEnable()
protected void updateButtonEnabling()
protected void updateButtonVisibility()
protected void setValidationColor(org.eclipse.swt.widgets.Control control, org.eclipse.swt.graphics.Color validationColor)
setValidationColor
in class SimpleControlSWTRenderer
control
- the control to set the color onvalidationColor
- the validation color to setSimpleControlSWTRenderer.setValidationColor(org.eclipse.swt.widgets.Control,
org.eclipse.swt.graphics.Color)
protected String getUnsetText()
getUnsetText
in class SimpleControlSWTRenderer
SimpleControlSWTRenderer.getUnsetText()
protected void rootDomainModelChanged() throws DatabindingFailedException
AbstractControlSWTRenderer.notifyChange()
when the root domain model of the view model context changes.rootDomainModelChanged
in class SimpleControlSWTControlSWTRenderer
DatabindingFailedException
- If the databinding failedSimpleControlSWTControlSWTRenderer.rootDomainModelChanged()
Copyright © 2019. All rights reserved.