public class MultiSegmentChildDmrsSWTRenderer extends MultiReferenceSWTRenderer
CUSTOM_VARIANT| Constructor and Description |
|---|
MultiSegmentChildDmrsSWTRenderer(VControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabinding emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
ImageRegistryService imageRegistryService,
EMFFormsLocalizationService localizationService)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.swt.widgets.Composite |
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.jface.viewers.ILabelProvider |
createLabelProvider()
Creates a new
ILabelProvider for the table viewer. |
protected void |
dispose()
Disposes all resources used by the renderer.
|
protected Optional<org.eclipse.emf.ecore.EObject> |
getContainer()
Returns the
EObject that contains the elements rendered in this multi reference. |
protected org.eclipse.emf.ecore.EReference |
getEStructuralFeature()
Returns the observed
EStructuralFeature. |
protected org.eclipse.core.databinding.observable.list.IObservableList<?> |
getReferencedElementsList()
Returns an
IObservableList that tracks all child dmrs of the table defined by this renderer's parent
VTableControl. |
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 |
postInit()
Use this method to initialize objects which are needed during rendering.
|
protected org.eclipse.swt.widgets.Control |
renderControl(SWTGridCell cell,
org.eclipse.swt.widgets.Composite parent)
Renders the passed
VElement. |
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.
|
protected boolean |
showMoveDownButton()
Returns true if the 'MoveDown' button is shown, false otherwise.
|
protected boolean |
showMoveUpButton()
Returns true if the 'MoveUp' button is shown, false otherwise.
|
protected void |
updateButtonEnabling()
Updates the enablement of 'addExisting', 'addNew', 'delete', 'moveUp' and 'moveDown' buttons according to the
bound input.
|
protected void |
updateButtonVisibility()
Updates the visibility of 'addExisting', 'addNew', 'delete', 'moveUp' and 'moveDown' buttons according to the
bound input.
|
applyEnable, applyReadOnly, applyValidation, compare, createAdapterFactory, createAddExistingButton, createAddNewButton, createControlComposite, createDefaultTableStyleProperty, createDeleteButton, createErrorLabel, createMoveDownButton, createMoveUpButton, createTitleComposite, getAdapterFactory, getDefaultReferenceStyle, getGridDescription, getImage, getLabelProvider, getReferenceDisplayName, getReferenceService, getTableHeightHint, getTableStyleProperty, getTableViewer, handleAddExisting, handleDelete, handleDoubleClick, handleMoveDown, handleMoveUp, ignoreEnableOnReadOnly, renderMultiReferenceControl, rootDomainModelChanged, updateButtons, updateTableViewerInputListapplyUnchangeableFeature, canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsDatabinding, getEMFFormsLabelProvider, getLabelStyleBits, getModelValue, getValidationBackgroundColor, getValidationBackgroundColor, getValidationForegroundColor, getValidationForegroundColor, getValidationIcon, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, isUnchangeableFeature, notifyChange, renderapplyValidation, applyVisible, canReveal, finalizeRendering, getControls, getDefaultFontName, init, isRenderingFinished, preInit, scrollToReveal, scrollToReveal, setControlEnabledcheckRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register@Inject public MultiSegmentChildDmrsSWTRenderer(VControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabinding emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, ImageRegistryService imageRegistryService, EMFFormsLocalizationService localizationService)
vElement - the view model element to be renderedviewContext - the view contextemfFormsDatabinding - The EMFFormsDatabindingemfFormsLabelProvider - The EMFFormsLabelProviderreportService - The ReportServicevtViewTemplateProvider - The VTViewTemplateProviderimageRegistryService - The ImageRegistryServicelocalizationService - the localization serviceprotected void postInit()
AbstractSWTRendererpostInit in class AbstractControlSWTRenderer<VControl>protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
AbstractSWTRendererVElement.renderControl in class MultiReferenceSWTRenderercell - 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 foundprotected org.eclipse.swt.widgets.Composite createButtonComposite(org.eclipse.swt.widgets.Composite parent)
throws DatabindingFailedException
MultiReferenceSWTRendererComposite if
necessary.createButtonComposite in class MultiReferenceSWTRendererparent - The parent of the created CompositeDatabindingFailedException - thrown if the databinding could not be executed successfullyprotected void updateButtonEnabling()
MultiReferenceSWTRendererupdateButtonEnabling in class MultiReferenceSWTRendererprotected void updateButtonVisibility()
MultiReferenceSWTRendererupdateButtonVisibility in class MultiReferenceSWTRendererprotected Optional<org.eclipse.emf.ecore.EObject> getContainer()
MultiReferenceSWTRendererEObject that contains the elements rendered in this multi reference.getContainer in class MultiReferenceSWTRendererEObject containing the elements rendered in this multi reference or nothing if the container
couldn't be computed.protected org.eclipse.emf.ecore.EReference getEStructuralFeature()
MultiReferenceSWTRendererEStructuralFeature.getEStructuralFeature in class MultiReferenceSWTRendererEStructuralFeature.protected boolean showAddExistingButton()
MultiReferenceSWTRenderershowAddExistingButton in class MultiReferenceSWTRendererprotected boolean showAddNewButton()
MultiReferenceSWTRenderershowAddNewButton in class MultiReferenceSWTRendererprotected boolean showDeleteButton()
MultiReferenceSWTRenderershowDeleteButton in class MultiReferenceSWTRendererprotected boolean showMoveUpButton()
MultiReferenceSWTRenderershowMoveUpButton in class MultiReferenceSWTRendererprotected boolean showMoveDownButton()
MultiReferenceSWTRenderershowMoveDownButton in class MultiReferenceSWTRendererprotected void handleAddNew(org.eclipse.jface.viewers.TableViewer tableViewer,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
MultiReferenceSWTRendererhandleAddNew in class MultiReferenceSWTRenderertableViewer - the TableViewereObject - The EObject to add tostructuralFeature - The corresponding EStructuralFeatureprotected org.eclipse.core.databinding.observable.list.IObservableList<?> getReferencedElementsList()
throws DatabindingFailedException
IObservableList that tracks all child dmrs of the table defined by this renderer's parent
VTableControl. The child dmrs are stored in the last segment of the VTableControl's
segment. This segment is a multi segment.
IMPORTANT: Can only be used after the field tableControl has been set
getReferencedElementsList in class MultiReferenceSWTRendererIObservableList of the referenced elementsDatabindingFailedException - If computing the list failed due to failed databindingMultiReferenceSWTRenderer.getReferencedElementsList()protected void dispose()
MultiReferenceSWTRendererdispose in class MultiReferenceSWTRendererAbstractControlSWTRenderer.dispose()protected org.eclipse.jface.viewers.ILabelProvider createLabelProvider()
MultiReferenceSWTRendererILabelProvider for the table viewer.createLabelProvider in class MultiReferenceSWTRendererILabelProvider.Copyright © 2020. All rights reserved.