public abstract class ExpectedValueControlRenderer extends SimpleControlSWTControlSWTRenderer
Modifier and Type | Class and Description |
---|---|
protected class |
ExpectedValueControlRenderer.ModelToTargetUpdateStrategy
The strategy to convert from model to target.
|
protected class |
ExpectedValueControlRenderer.TargetToModelUpdateStrategy
The strategy to convert from target to model.
|
CUSTOM_VARIANT
Constructor and Description |
---|
ExpectedValueControlRenderer(VControl vElement,
ViewModelContext viewContext,
ReportService reportService)
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 org.eclipse.core.databinding.Binding |
createTooltipBinding(org.eclipse.swt.widgets.Control text,
org.eclipse.core.databinding.observable.value.IObservableValue modelValue,
org.eclipse.core.databinding.DataBindingContext dataBindingContext,
org.eclipse.core.databinding.UpdateValueStrategy targetToModel,
org.eclipse.core.databinding.UpdateValueStrategy modelToTarget)
Creates a tooltip binding for this control.
|
protected org.eclipse.emf.ecore.EObject |
getObservedEObject()
Returns the model object representing the value for this renderer's domain model reference.
|
protected Object |
getSelectedObject(org.eclipse.emf.ecore.EAttribute attribute)
Lets the user select an object and returns the selection.
|
protected String |
getUnsetText()
Provide the unset text to show on the label when value is unset.
|
protected abstract void |
onSelectButton(org.eclipse.swt.widgets.Label text)
Called when the select value button is pressed.
|
createControl, rootDomainModelChanged
applyValidation, createControlCell, createLabelCell, createValidationCell, dispose, getGridDescription, isUnsettable, renderControl, setControlEnabled, setControlIdData, setValidationColor, setValidationForegroundColor
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
public ExpectedValueControlRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService)
vElement
- the view model element to be renderedviewContext
- the view contextreportService
- The ReportService
protected org.eclipse.swt.widgets.Control createSWTControl(org.eclipse.swt.widgets.Composite parent)
createSWTControl
in class SimpleControlSWTControlSWTRenderer
parent
- the Composite
to use as a parentSimpleControlSWTControlSWTRenderer.createSWTControl(org.eclipse.swt.widgets.Composite)
protected org.eclipse.core.databinding.Binding[] createBindings(org.eclipse.swt.widgets.Control control) throws DatabindingFailedException
Bindings
for this controls.createBindings
in class SimpleControlSWTControlSWTRenderer
control
- the Control
to create the binding forDatabindingFailedException
- if the creation of the bindings fails.org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTControlSWTRenderer#createBindings(org.eclipse.swt.widgets.Control,
org.eclipse.emf.ecore.EStructuralFeature.Setting)
protected org.eclipse.core.databinding.Binding createTooltipBinding(org.eclipse.swt.widgets.Control text, org.eclipse.core.databinding.observable.value.IObservableValue modelValue, org.eclipse.core.databinding.DataBindingContext dataBindingContext, org.eclipse.core.databinding.UpdateValueStrategy targetToModel, org.eclipse.core.databinding.UpdateValueStrategy modelToTarget)
text
- the Text
to bindmodelValue
- the IObservableValue
to binddataBindingContext
- the DataBindingContext
to usetargetToModel
- the UpdateValueStrategy
from target to ModelmodelToTarget
- the UpdateValueStrategy
from model to targetBinding
protected Object getSelectedObject(org.eclipse.emf.ecore.EAttribute attribute)
attribute
- the attribute for which an object is neededprotected abstract void onSelectButton(org.eclipse.swt.widgets.Label text)
text
- the label which should be used to set the valueprotected org.eclipse.emf.ecore.EObject getObservedEObject() throws DatabindingFailedException
DatabindingFailedException
- if the databinding failsprotected String getUnsetText()
getUnsetText
in class SimpleControlSWTRenderer
SimpleControlSWTRenderer.getUnsetText()
Copyright © 2017. All rights reserved.