public class MultiReferenceSWTRenderer extends AbstractControlSWTRenderer<VControl>
CUSTOM_VARIANT| Constructor and Description |
|---|
MultiReferenceSWTRenderer(VControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabinding emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
ImageRegistryService imageRegistryService)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyValidation()
Allows implementers to display the validation state of the control.
|
protected org.eclipse.swt.widgets.Button |
createAddExistingButton(org.eclipse.swt.widgets.Composite parent,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Creates a button that enables the addition of existing references to the given
EStructuralFeature. |
protected org.eclipse.swt.widgets.Button |
createAddNewButton(org.eclipse.swt.widgets.Composite parent,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Creates a button that enables the addition of newly created references to the given
EStructuralFeature. |
protected void |
createButtonComposite(org.eclipse.swt.widgets.Composite parent)
Adds a composite with the buttons 'AddExisting', 'AddNew' and 'Delete' to the given
Composite if
necessary. |
protected org.eclipse.swt.widgets.Composite |
createControlComposite(org.eclipse.swt.widgets.Composite composite)
Creates the composite which will be the parent for the table.
|
protected org.eclipse.swt.widgets.Button |
createDeleteButton(org.eclipse.swt.widgets.Composite parent,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Creates a button that enables the removal of existing references from the given
EStructuralFeature. |
protected org.eclipse.swt.widgets.Control |
createErrorLabel(org.eclipse.swt.widgets.Composite parent,
Exception ex)
Creates an error label for the given
Exception. |
protected void |
createTitleComposite(org.eclipse.swt.widgets.Composite parent)
Creates a composite with a label, a validation icon and a button composite.
|
protected void |
dispose()
Disposes all resources used by the renderer.
|
SWTGridDescription |
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.
|
protected org.eclipse.swt.graphics.Image |
getImage(String path)
Returns an
Image from the image registry. |
protected int |
getTableHeightHint()
Returns the height for the table that will be created.
|
protected org.eclipse.jface.viewers.TableViewer |
getTableViewer()
Gives access to the tableViewer used to display the attributes.
|
protected void |
handleAddExisting(org.eclipse.jface.viewers.TableViewer tableViewer,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Method for adding an existing element.
|
protected void |
handleAddNew(org.eclipse.jface.viewers.TableViewer tableViewer,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Method for adding a new element.
|
protected void |
handleDelete(org.eclipse.jface.viewers.TableViewer tableViewer,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Method for deleting elements.
|
protected void |
handleDoubleClick(org.eclipse.emf.ecore.EObject selectedObject)
Method for handling a double click.
|
protected org.eclipse.swt.widgets.Control |
renderControl(SWTGridCell cell,
org.eclipse.swt.widgets.Composite parent)
Renders the passed
VElement. |
protected void |
rootDomainModelChanged()
This method is called in
AbstractControlSWTRenderer.notifyChange() when the root domain model of the view model context changes. |
protected boolean |
showAddExistingButton()
Returns true if the 'AddExisting' button is shown, false otherwise.
|
protected boolean |
showAddNewButton()
Returns true if the 'AddNew' button is shown, false otherwise.
|
protected boolean |
showDeleteButton()
Returns true if the 'Delete' button is shown, false otherwise.
|
applyEnable, canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsDatabinding, getEMFFormsLabelProvider, getModelValue, getValidationBackgroundColor, getValidationForegroundColor, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, notifyChange, postInit, renderapplyReadOnly, applyVisible, finalizeRendering, getControls, getDefaultFontName, init, preInit, setControlEnabledcheckRenderer, getReportService, getVElement, getViewModelContext@Inject public MultiReferenceSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, ImageRegistryService imageRegistryService)
vElement - the view model element to be renderedviewContext - the view contextemfFormsDatabinding - The EMFFormsDatabindingemfFormsLabelProvider - The EMFFormsLabelProviderreportService - The ReportServicevtViewTemplateProvider - The VTViewTemplateProviderimageRegistryService - The ImageRegistryServicepublic SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
getGridDescription in class AbstractSWTRenderer<VControl>gridDescription - the current SWTGridDescriptionAbstractSWTRenderer.getGridDescription(org.eclipse.emfforms.spi.swt.core.layout.SWTGridDescription)protected boolean showAddExistingButton()
protected boolean showAddNewButton()
protected boolean showDeleteButton()
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
VElement.renderControl in class AbstractSWTRenderer<VControl>cell - the GridCell of the control to renderparent - the Composite to render onControlNoRendererFoundException - this is thrown when a renderer cannot be foundNoPropertyDescriptorFoundExeption - this is thrown when no property descriptor can be foundorg.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer#renderControl(org.eclipse.emfforms.spi.swt.core.layout.SWTGridCell,
org.eclipse.emf.ecp.view.spi.swt.Composite)protected org.eclipse.swt.widgets.Composite createControlComposite(org.eclipse.swt.widgets.Composite composite)
composite - the parent compositeprotected int getTableHeightHint()
protected org.eclipse.jface.viewers.TableViewer getTableViewer()
protected org.eclipse.swt.widgets.Control createErrorLabel(org.eclipse.swt.widgets.Composite parent,
Exception ex)
Exception.parent - The parent of the Labelex - The Exception causing the errorLabelprotected void dispose()
dispose in class AbstractControlSWTRenderer<VControl>AbstractControlSWTRenderer.dispose()protected org.eclipse.swt.widgets.Button createAddExistingButton(org.eclipse.swt.widgets.Composite parent,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
EStructuralFeature.parent - The parent of the created ButtonstructuralFeature - The EStructuralFeature to which references are addedButtonprotected org.eclipse.swt.widgets.Button createAddNewButton(org.eclipse.swt.widgets.Composite parent,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
EStructuralFeature.parent - The parent of the created ButtonstructuralFeature - The EStructuralFeature to which references are addedButtonprotected org.eclipse.swt.widgets.Button createDeleteButton(org.eclipse.swt.widgets.Composite parent,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
EStructuralFeature.parent - The parent of the newly created ButtonstructuralFeature - The EStructuralFeature from which references are removedButtonprotected void createButtonComposite(org.eclipse.swt.widgets.Composite parent)
throws DatabindingFailedException
Composite if
necessary.parent - The parent of the created CompositeDatabindingFailedException - thrown if the databinding could not be executed successfullyprotected void createTitleComposite(org.eclipse.swt.widgets.Composite parent)
throws DatabindingFailedException
parent - The parent of the created CompositeDatabindingFailedException - thrown if the databinding could not be executed successfullyprotected org.eclipse.swt.graphics.Image getImage(String path)
Image from the image registry.path - the path to the imageprotected void handleDoubleClick(org.eclipse.emf.ecore.EObject selectedObject)
selectedObject - the selected EObjectprotected void handleAddExisting(org.eclipse.jface.viewers.TableViewer tableViewer,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
tableViewer - the TableViewereObject - The EObject to add tostructuralFeature - The corresponding EStructuralFeatureprotected void handleAddNew(org.eclipse.jface.viewers.TableViewer tableViewer,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
tableViewer - the TableViewereObject - The EObject to add tostructuralFeature - The corresponding EStructuralFeatureprotected void handleDelete(org.eclipse.jface.viewers.TableViewer tableViewer,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
tableViewer - the TableViewereObject - The EObject to delete fromstructuralFeature - The corresponding EStructuralFeatureprotected void rootDomainModelChanged()
throws DatabindingFailedException
AbstractControlSWTRenderer.notifyChange() when the root domain model of the view model context changes.rootDomainModelChanged in class AbstractControlSWTRenderer<VControl>DatabindingFailedException - If the databinding failedAbstractControlSWTRenderer.rootDomainModelChanged()protected void applyValidation()
AbstractSWTRendererapplyValidation in class AbstractSWTRenderer<VControl>Copyright © 2016. All rights reserved.