public class XMLDateControlSWTRenderer extends TextControlSWTRenderer
TextControlSWTRenderer.ModelToTargetUpdateStrategy, TextControlSWTRenderer.TargetToModelUpdateStrategy
CUSTOM_VARIANT
Constructor and Description |
---|
XMLDateControlSWTRenderer(VControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabinding emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
EMFFormsEditSupport emfFormsEditSupport,
EMFFormsLocalizationService localizationService,
EMFFormsLocaleProvider localeProvider,
ImageRegistryService imageRegistryService)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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 |
getTextMessage()
Returns the text which should be set as the message text on the Text field.
|
protected String |
getTextVariantID()
The VariantId to use e.g.
|
protected String |
getUnsetText()
Provide the unset text to show on the label when value is unset.
|
protected void |
setControlEnabled(SWTGridCell gridCell,
org.eclipse.swt.widgets.Control control,
boolean enabled)
Wraps the call to enable/disable a control.
|
protected DateFormat |
setupFormat()
Setups the
DateFormat . |
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 |
setValidationForegroundColor(org.eclipse.swt.widgets.Control control,
org.eclipse.swt.graphics.Color validationColor)
Set the provided validation color as the foreground for the provided control.
|
bindValue, createTooltipBinding, getDefaultAlignment, getEMFFormsEditSupport, getTextWidgetStyle, useOnModifyDatabinding
createControl, rootDomainModelChanged
applyValidation, createControlCell, createLabelCell, createValidationCell, getGridDescription, isUnsettable, renderControl, setControlIdData
applyEnable, canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsDatabinding, getEMFFormsLabelProvider, getModelValue, getValidationBackgroundColor, getValidationForegroundColor, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, notifyChange, postInit, render
applyReadOnly, applyVisible, finalizeRendering, getControls, getDefaultFontName, init, preInit
checkRenderer, getReportService, getVElement, getViewModelContext
@Inject public XMLDateControlSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, EMFFormsEditSupport emfFormsEditSupport, EMFFormsLocalizationService localizationService, EMFFormsLocaleProvider localeProvider, ImageRegistryService imageRegistryService)
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- The ReportService
emfFormsDatabinding
- The EMFFormsDatabinding
emfFormsLabelProvider
- The EMFFormsLabelProvider
vtViewTemplateProvider
- The VTViewTemplateProvider
emfFormsEditSupport
- The EMFFormsEditSupport
localizationService
- The EMFFormsLocalizationService
localeProvider
- The EMFFormsLocaleProvider
imageRegistryService
- The ImageRegistryService
protected org.eclipse.swt.widgets.Control createSWTControl(org.eclipse.swt.widgets.Composite parent)
SimpleControlSWTControlSWTRenderer
createSWTControl
in class TextControlSWTRenderer
parent
- the Composite
to use as a parentprotected String getTextMessage()
TextControlSWTRenderer
getTextMessage
in class TextControlSWTRenderer
protected String getTextVariantID()
TextControlSWTRenderer
getTextVariantID
in class TextControlSWTRenderer
protected org.eclipse.core.databinding.Binding[] createBindings(org.eclipse.swt.widgets.Control control) throws DatabindingFailedException
SimpleControlSWTControlSWTRenderer
Bindings
for this controls.createBindings
in class TextControlSWTRenderer
control
- the Control
to create the binding forDatabindingFailedException
- if the creation of the bindings fails.protected DateFormat setupFormat()
DateFormat
.DateFormat
protected void setValidationColor(org.eclipse.swt.widgets.Control control, org.eclipse.swt.graphics.Color validationColor)
setValidationColor
in class TextControlSWTRenderer
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 void setValidationForegroundColor(org.eclipse.swt.widgets.Control control, org.eclipse.swt.graphics.Color validationColor)
SimpleControlSWTRenderer
setValidationForegroundColor
in class TextControlSWTRenderer
control
- the control to set the color onvalidationColor
- the validation color to setprotected void setControlEnabled(SWTGridCell gridCell, org.eclipse.swt.widgets.Control control, boolean enabled)
AbstractSWTRenderer
setControlEnabled
in class TextControlSWTRenderer
gridCell
- the SWTGridCell
to enable/disablecontrol
- the Control
to enable/disableenabled
- true if control should be enabled, false otherwiseprotected String getUnsetText()
getUnsetText
in class TextControlSWTRenderer
TextControlSWTRenderer.getUnsetText()
protected void dispose()
dispose
in class SimpleControlSWTRenderer
SimpleControlSWTRenderer.dispose()
Copyright © 2016. All rights reserved.