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 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 void |
dispose()
Disposes all resources used by the renderer.
|
protected org.eclipse.swt.graphics.Image |
getAddReferenceButtonImage()
Returns the add reference image for button.
|
protected VTReferenceStyleProperty |
getDefaultReferenceStyle()
Creates and returns a default version of a
VTReferenceStyleProperty. |
protected org.eclipse.swt.graphics.Image |
getDeleteReferenceButtonImage()
Returns the image for delete reference button.
|
protected org.osgi.framework.Bundle |
getIconBundle()
Returns the bundle where the icon file is located.
|
protected org.eclipse.swt.graphics.Image |
getImage(org.osgi.framework.Bundle bundle,
String iconPath)
Returns an image to be displayed given the bundle and path in the bundle where icon file can be found.
|
protected org.eclipse.swt.graphics.Image |
getImage(Object value)
Returns the image to be used for the given linked
value. |
protected org.eclipse.swt.graphics.Image |
getNewReferenceButtonImage()
Returns the new reference image for button.
|
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.
|
protected boolean |
openNewReferenceInContext()
Whether a new reference should be opened in a new context.
|
createControl, getFeature, rootDomainModelChanged, withPreSetValidationapplyValidation, createControlCell, createDefaultUnsettableStyleProperty, createLabelCell, createValidationCell, getGridDescription, getLabelWidth, getUnsettableStyleProperty, isUnsettable, renderControl, setControlEnabled, setControlIdData, setValidationColor, setValidationForegroundColorapplyEnable, applyReadOnly, applyUnchangeableFeature, canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsDatabinding, getEMFFormsLabelProvider, getLabelStyleBits, getModelValue, getValidationBackgroundColor, getValidationForegroundColor, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, isUnchangeableFeature, notifyChange, postInit, renderapplyValidation, applyVisible, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, preInitcheckRenderer, 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
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 void createButtons(org.eclipse.swt.widgets.Composite parent)
createSWTControl(Composite) in order to create the buttons.parent - the parent compositeprotected VTReferenceStyleProperty getDefaultReferenceStyle()
VTReferenceStyleProperty.VTReferenceStylePropertyprotected 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 org.eclipse.swt.graphics.Image getAddReferenceButtonImage()
protected 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 org.eclipse.swt.graphics.Image getNewReferenceButtonImage()
protected boolean openNewReferenceInContext()
protected 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 org.eclipse.swt.graphics.Image getDeleteReferenceButtonImage()
protected org.eclipse.swt.graphics.Image getImage(org.osgi.framework.Bundle bundle,
String iconPath)
The image found is not meant to be disposed by user.
bundle - the bundle where the image file is locatediconPath - the path of the icon file in the bundleprotected org.osgi.framework.Bundle getIconBundle()
protected String getText(Object value)
value.value - the valueDatabindingFailedExceptionNoLabelFoundExceptionprotected 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()
ReferenceServiceprotected int getNumButtons()
protected String getUnsetText()
SimpleControlSWTRenderergetUnsetText in class SimpleControlSWTRendererprotected void dispose()
SimpleControlSWTRendererdispose in class SimpleControlSWTRendererAbstractSWTRenderer.dispose()Copyright © 2019. All rights reserved.