public class DomainModelReferenceControlSWTRenderer extends SimpleControlSWTControlSWTRenderer
CUSTOM_VARIANT| Constructor and Description |
|---|
DomainModelReferenceControlSWTRenderer(VControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabindingEMF emfFormsDatabindingEMF,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
EMFFormsEditSupport emfFormsEditSupport)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addNewSegmentDmr(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference)
Create a new segment based domain model reference and set it in the
reference of the given
container object. |
protected org.eclipse.core.databinding.Binding[] |
createBindings(org.eclipse.swt.widgets.Control control)
Create the
Bindings for this controls. |
protected org.eclipse.swt.widgets.Button |
createButtonForAction(org.eclipse.jface.action.Action action,
org.eclipse.swt.widgets.Composite composite)
A helper method which creates a button for an action on a composite.
|
protected org.eclipse.swt.widgets.Control |
createSWTControl(org.eclipse.swt.widgets.Composite parent)
Creates the Control.
|
protected void |
editSegmentDmr(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference,
VDomainModelReference dmr)
Edits the existing DMR set in the
reference of the given
container object. |
protected org.eclipse.emf.ecore.EClass |
getDmrRootEClass()
Returns the root EClass of the domain model reference.
|
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. |
void |
scrollToReveal()
If my control is rendered within a scrolled composite, scroll that composite to reveal me.
|
createControl, getFeature, withPreSetValidationapplyReadOnly, applyValidation, createControlCell, createDefaultUnsettableStyleProperty, createLabelCell, createValidationCell, dispose, getGridDescription, getLabelWidth, getUnsettableStyleProperty, isUnsettable, renderControl, setControlEnabled, setControlIdData, setValidationColor, setValidationForegroundColorapplyEnable, applyUnchangeableFeature, canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsDatabinding, getEMFFormsLabelProvider, getLabelStyleBits, getModelValue, getValidationBackgroundColor, getValidationForegroundColor, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, isUnchangeableFeature, notifyChange, postInit, renderapplyValidation, applyVisible, canReveal, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, isRenderingFinished, preInit, scrollToRevealcheckRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register@Inject public DomainModelReferenceControlSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabindingEMF emfFormsDatabindingEMF, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, EMFFormsEditSupport emfFormsEditSupport)
vElement - the view model element to be renderedviewContext - the view contextreportService - The ReportServiceemfFormsDatabindingEMF - The EMFFormsDatabindingemfFormsLabelProvider - The EMFFormsLabelProvidervtViewTemplateProvider - The VTViewTemplateProvideremfFormsEditSupport - The EMFFormsEditSupportprotected org.eclipse.core.databinding.Binding[] createBindings(org.eclipse.swt.widgets.Control control)
throws DatabindingFailedException
SimpleControlSWTControlSWTRendererBindings for this controls.createBindings in class SimpleControlSWTControlSWTRenderercontrol - the Control to create the binding forDatabindingFailedException - if the creation of the bindings fails.protected org.eclipse.swt.widgets.Control createSWTControl(org.eclipse.swt.widgets.Composite parent)
throws DatabindingFailedException
SimpleControlSWTControlSWTRenderercreateSWTControl in class SimpleControlSWTControlSWTRendererparent - the Composite to use as a parentDatabindingFailedException - if the creation of the control fails due to databinding problemsprotected org.eclipse.swt.widgets.Button createButtonForAction(org.eclipse.jface.action.Action action,
org.eclipse.swt.widgets.Composite composite)
action - the action to create a button forcomposite - the composite to create the button ontoprotected String getUnsetText()
SimpleControlSWTRenderergetUnsetText in class SimpleControlSWTRendererprotected void addNewSegmentDmr(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference)
reference of the given
container object.container - The EObject which will contain the new domain model referencereference - The EReference which the new domain model reference will be set inprotected void editSegmentDmr(org.eclipse.emf.ecore.EObject container,
org.eclipse.emf.ecore.EReference reference,
VDomainModelReference dmr)
reference of the given
container object.container - The EObject which will contain the new domain model referencereference - The EReference which contains the current new domain model referencedmr - The domain model reference to editprotected org.eclipse.emf.ecore.EClass getDmrRootEClass()
protected void rootDomainModelChanged()
throws DatabindingFailedException
SimpleControlSWTControlSWTRendererAbstractControlSWTRenderer.notifyChange() when the root domain model of the view model context changes.rootDomainModelChanged in class SimpleControlSWTControlSWTRendererDatabindingFailedException - If the databinding failedAbstractControlSWTRenderer.rootDomainModelChanged()public void scrollToReveal()
AbstractSWTRendererscrollToReveal in class AbstractSWTRenderer<VControl>Copyright © 2019. All rights reserved.