public class LinkControlSWTRenderer extends SimpleControlSWTControlSWTRenderer
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 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.swt.graphics.Image |
getImage(Object value)
Returns the image to be used for the given linked
value . |
protected int |
getNumButtons() |
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, 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
@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 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 int getNumButtons()
protected String getUnsetText()
SimpleControlSWTRenderer
getUnsetText
in class SimpleControlSWTRenderer
Copyright © 2016. All rights reserved.