public class GridControlDetailPanelRenderer extends GridControlSWTRenderer
VTableControl
with a detail editing
panel.GridControlSWTRenderer.CustomGridTableViewer, GridControlSWTRenderer.GridTableControlSWTRendererTableViewerCreator
TableControlSWTRenderer.AutoSortModelChangeListener, TableControlSWTRenderer.CompactVerticallyTableControlSWTRendererCompositeBuilder, TableControlSWTRenderer.ECPCellLabelProvider, TableControlSWTRenderer.ECPTableViewerComparator, TableControlSWTRenderer.TableControlComparator, TableControlSWTRenderer.TableControlEditingSupportAndLabelProvider, TableControlSWTRenderer.TableControlSWTRendererCompositeBuilder, TableControlSWTRenderer.TableControlSWTRendererTableViewerCreator
FIXED_COLUMNS, TABLE_CUSTOM_VARIANT, VALIDATION_PREFERRED_SIZE
CUSTOM_VARIANT
Constructor and Description |
---|
GridControlDetailPanelRenderer(VTableControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabindingEMF emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
ImageRegistryService imageRegistryService,
EMFFormsEditSupport emfFormsEditSupport,
EStructuralFeatureValueConverterService converterService,
EMFFormsLocalizationService localizationService)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyEnable()
Allows implementers to set a control to enabled.
|
protected void |
applyReadOnly()
Marks a controls as readonly.
|
protected org.eclipse.swt.widgets.Composite |
createBorderComposite(org.eclipse.swt.widgets.Composite parent)
Creates a composite with a border to surround the grid and detail panel.
|
protected org.eclipse.swt.widgets.Composite |
createControlComposite(org.eclipse.swt.widgets.Composite composite)
Creates and returns the composite which will be the parent for the table viewer.
|
protected org.eclipse.swt.widgets.Composite |
createDetailPanel(org.eclipse.swt.custom.ScrolledComposite composite)
Creates the detail panel.
|
protected org.eclipse.swt.custom.SashForm |
createSash(org.eclipse.swt.widgets.Composite parent)
Creates the SashForm for the grid and the detail panel.
|
protected org.eclipse.swt.custom.ScrolledComposite |
createScrolledDetail(org.eclipse.swt.widgets.Composite parent)
Creates a scrolled Composite that contains the detail panel.
|
protected org.eclipse.swt.widgets.Composite |
createTableComposite(org.eclipse.swt.widgets.Composite parent)
Creates the Composite that will contain the grid.
|
protected void |
deleteRows(List<org.eclipse.emf.ecore.EObject> deletionList,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Deprecated.
|
protected void |
dispose()
Disposes all resources used by the renderer.
|
protected int |
getDetailPanelHeightHint()
Returns the preferred height for the detail panel.
|
protected VView |
getView(org.eclipse.emf.ecore.EObject selectedEObject)
Returns a fresh copy of the
VView used for detail editing based on the provided EObject. |
protected void |
handleEmptySelection()
Handle empty selection.
|
protected void |
handleMultiSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
Handle multi selection.
|
protected void |
handleSingleSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
Handle a single selection.
|
protected void |
renderSelectedObject(org.eclipse.swt.widgets.Composite composite,
org.eclipse.emf.ecore.EObject eObject)
Called in order to render the selectedObject onto the created detail pane.
|
protected void |
viewerSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
This method gets called when the selection on the
TableViewer (see TableControlSWTRenderer.getTableViewer() ) has
changed. |
computeRequiredHeight, createTableViewerSWTBuilder, getColumns, getConverterService, getHorizontalBar, getLocalizationService, getSelectionIndex, getTableViewerCreator, getVerticalBar
addAdditionalColumns, addButtonsToButtonBar, addRow, applyUnchangeableFeature, applyValidation, applyValidation, canEditObject, compare, configureActions, createActionBar, createCellEditor, createCellLabelProvider, createDefaultBackgroundStyleProperty, createDefaultFontPropertiesStyleProperty, createDefaultTableStyleProperty, createDefaultTableValidationStyleProperty, createLabel, createTableViewerComparator, createTableViewerCompositeBuilder, createTableViewerSWTBuilder, createViewerActionContext, deleteRowUserConfirmDialog, getAddButton, getBackgroundStyleProperty, getColumnDomainModelReferences, getColumnFeature, getControlForAction, getDMRToMultiReference, getEMFFormsDatabinding, getEnumeratorComparator, getFontPropertiesStyleProperty, getGridDescription, getImage, getImage, getKeyBindingsForAction, getRemoveButton, getSettingFromObservable, getSortColumnFeature, getSWTColor, getTableHeightHint, getTableStyleProperty, getTableValidationStyleProperty, getTableViewer, getTableViewerComposite, postRefresh, postRefresh, renderControl, renderTableControl, reveal, rootDomainModelChanged, setSortColumnFeature, setTableViewer, shouldCreateCellEditor, updateActionBar
canHandleControlProcessor, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsLabelProvider, getLabelStyleBits, getModelValue, getValidationBackgroundColor, getValidationForegroundColor, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, isUnchangeableFeature, notifyChange, postInit, render
applyVisible, canReveal, finalizeRendering, getControls, getDefaultFontName, ignoreEnableOnReadOnly, init, isRenderingFinished, preInit, scrollToReveal, scrollToReveal, setControlEnabled
checkRenderer, getRenderer, getReportService, getVElement, getViewModelContext, register
@Inject public GridControlDetailPanelRenderer(VTableControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabindingEMF emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, ImageRegistryService imageRegistryService, EMFFormsEditSupport emfFormsEditSupport, EStructuralFeatureValueConverterService converterService, EMFFormsLocalizationService localizationService)
vElement
- the view model element to be renderedviewContext
- the view contextemfFormsDatabinding
- The EMFFormsDatabindingEMF
emfFormsLabelProvider
- The EMFFormsLabelProvider
reportService
- The ReportService
vtViewTemplateProvider
- The VTViewTemplateProvider
imageRegistryService
- The ImageRegistryService
emfFormsEditSupport
- The EMFFormsEditSupport
converterService
- the EStructuralFeatureValueConverterService
localizationService
- the EMFFormsLocalizationService
protected void dispose()
AbstractSWTRenderer
dispose
in class TableControlSWTRenderer
protected org.eclipse.swt.widgets.Composite createControlComposite(org.eclipse.swt.widgets.Composite composite)
TableControlSWTRenderer
createControlComposite
in class TableControlSWTRenderer
composite
- the parent composite including the title/button barprotected org.eclipse.swt.widgets.Composite createBorderComposite(org.eclipse.swt.widgets.Composite parent)
parent
- The parent Compositeprotected org.eclipse.swt.custom.SashForm createSash(org.eclipse.swt.widgets.Composite parent)
parent
- the parentprotected org.eclipse.swt.widgets.Composite createTableComposite(org.eclipse.swt.widgets.Composite parent)
parent
- The parent Composite to create the grid composite onprotected org.eclipse.swt.custom.ScrolledComposite createScrolledDetail(org.eclipse.swt.widgets.Composite parent)
parent
- The parent Composite to create the scrolled composite onprotected int getDetailPanelHeightHint()
protected org.eclipse.swt.widgets.Composite createDetailPanel(org.eclipse.swt.custom.ScrolledComposite composite)
composite
- the parentprotected VView getView(org.eclipse.emf.ecore.EObject selectedEObject)
VView
used for detail editing based on the provided EObject.selectedEObject
- The selected EObject for which to provide the Viewprotected void applyEnable()
AbstractControlSWTRenderer
applyEnable
in class TableControlSWTRenderer
AbstractSWTRenderer.applyEnable()
protected void applyReadOnly()
AbstractControlSWTRenderer
applyReadOnly
in class TableControlSWTRenderer
AbstractSWTRenderer.applyReadOnly()
protected void viewerSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
TableViewer
(see TableControlSWTRenderer.getTableViewer()
) has
changed.
If you override this method make sure to call super.
viewerSelectionChanged
in class TableControlSWTRenderer
event
- the SelectionChangedEvent
TableControlSWTRenderer.viewerSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
protected void handleSingleSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
selection
- the selectionprotected void renderSelectedObject(org.eclipse.swt.widgets.Composite composite, org.eclipse.emf.ecore.EObject eObject)
composite
- The Composite
to render oneObject
- The selected EObject
to renderprotected void handleMultiSelection(org.eclipse.jface.viewers.IStructuredSelection selection)
selection
- the selectionprotected void handleEmptySelection()
@Deprecated protected void deleteRows(List<org.eclipse.emf.ecore.EObject> deletionList, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
TableControlSWTRenderer
#deleteRowUserConfirmDialog(List)
after the user confirmed to delete the selected
elements.deleteRows
in class TableControlSWTRenderer
deletionList
- the list of EObjects
to deleteeObject
- The containment reference EObject
structuralFeature
- The containment reference EStructuralFeature
Copyright © 2019. All rights reserved.