public class LinkControlSWTRenderer extends SimpleControlSWTControlSWTRenderer
createDefaultUnsettableStyleProperty
CUSTOM_VARIANT
Constructor and Description |
---|
LinkControlSWTRenderer(VControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabinding emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
EMFFormsLocalizationService localizationService,
ImageRegistryService imageRegistryService,
EMFFormsEditSupport emfFormsEditSuppport) |
Modifier and Type | Method and Description |
---|---|
protected void |
createAddReferenceButton(org.eclipse.swt.widgets.Composite parent,
String elementDisplayName)
Called by
createButtons(Composite) to create the add existing reference button. |
protected org.eclipse.core.databinding.Binding[] |
createBindings(org.eclipse.swt.widgets.Control control)
Create the
Bindings for this controls. |
protected void |
createButtons(org.eclipse.swt.widgets.Composite parent)
Called by
createSWTControl(Composite) in order to create the buttons. |
protected void |
createDeleteReferenceButton(org.eclipse.swt.widgets.Composite parent,
String elementDisplayName)
Called by
createButtons(Composite) to create the delete reference button. |
protected void |
createNewReferenceButton(org.eclipse.swt.widgets.Composite parent,
String elementDisplayName)
Called by
createButtons(Composite) to create the create new reference button. |
protected org.eclipse.swt.widgets.Control |
createSWTControl(org.eclipse.swt.widgets.Composite parent)
Creates the Control.
|
protected org.eclipse.swt.graphics.Image |
getImage(Object value)
Returns the image to be used for the given linked
value . |
protected int |
getNumButtons() |
protected ReferenceService |
getReferenceService() |
protected String |
getText(Object value)
Returns the link text to be used for the given linked
value . |
protected String |
getUnsetText()
Provide the unset text to show on the label when value is unset.
|
protected void |
linkClicked(org.eclipse.emf.ecore.EObject value)
This code is called whenever the link of the link widget is clicked.
|
createControl, getFeature, rootDomainModelChanged, withPreSetValidation
applyValidation, createControlCell, createDefaultUnsettableStyleProperty, createLabelCell, createValidationCell, dispose, getGridDescription, getUnsettableStyleProperty, 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, applyValidation, applyVisible, finalizeRendering, getControls, getDefaultFontName, init, preInit
checkRenderer, getReportService, getVElement, getViewModelContext
@Inject public LinkControlSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, EMFFormsLocalizationService localizationService, ImageRegistryService imageRegistryService, EMFFormsEditSupport emfFormsEditSuppport)
vElement
- the element to renderviewContext
- the view model contextreportService
- the report serviceemfFormsDatabinding
- the data binding serviceemfFormsLabelProvider
- the label providervtViewTemplateProvider
- the view template providerlocalizationService
- the localization serviceimageRegistryService
- the image registry serviceemfFormsEditSuppport
- the edit supportprotected 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 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 createButtons(org.eclipse.swt.widgets.Composite parent)
createSWTControl(Composite)
in order to create the buttons.parent
- the parent compositeprotected void createAddReferenceButton(org.eclipse.swt.widgets.Composite parent, String elementDisplayName)
createButtons(Composite)
to create the add existing reference button.parent
- the parent compositeelementDisplayName
- the display name of the referenceprotected void createNewReferenceButton(org.eclipse.swt.widgets.Composite parent, String elementDisplayName)
createButtons(Composite)
to create the create new reference button.parent
- the parent compositeelementDisplayName
- the display name of the referenceprotected void createDeleteReferenceButton(org.eclipse.swt.widgets.Composite parent, String elementDisplayName)
createButtons(Composite)
to create the delete reference button.parent
- the parent compositeelementDisplayName
- the display name of the referenceprotected String getText(Object value)
value
.value
- the valueDatabindingFailedException
NoLabelFoundException
protected org.eclipse.swt.graphics.Image getImage(Object value)
value
.value
- the object for which the image is retrievedprotected void linkClicked(org.eclipse.emf.ecore.EObject value)
value
- the EObject that is linkedprotected ReferenceService getReferenceService()
ReferenceService
protected int getNumButtons()
protected String getUnsetText()
SimpleControlSWTRenderer
getUnsetText
in class SimpleControlSWTRenderer
Copyright © 2017. All rights reserved.