public class TableControlDetailPanelRenderer extends TableControlSWTRenderer
VTableControl
with a detail editing
panel.TableControlSWTRenderer.ECPCellLabelProvider, TableControlSWTRenderer.ECPTableViewerComparator, TableControlSWTRenderer.TableControlSWTRendererButtonBarBuilder, TableControlSWTRenderer.TableControlSWTRendererTableViewerCreator
FIXED_COLUMNS, TABLE_CUSTOM_VARIANT
CUSTOM_VARIANT
Constructor and Description |
---|
TableControlDetailPanelRenderer(VTableControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabindingEMF emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
ImageRegistryService imageRegistryService,
EMFFormsEditSupport emfFormsEditSupport)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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 void |
deleteRows(List<org.eclipse.emf.ecore.EObject> deletionList,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
This is called by
#deleteRowUserConfirmDialog(List) after the user confirmed to delete the selected
elements. |
protected int |
getDetailPanelHeightHint()
Returns the prefereed height for the detail panel.
|
protected VView |
getView()
Returns a fresh copy of the
VView used for detail editing. |
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. |
addAdditionalColumns, addButtonsToButtonBar, addRow, applyEnable, applyReadOnly, applyValidation, compare, createCellEditor, deleteRowUserConfirmDialog, dispose, getAddButton, getBackgroundStyleProperty, getColumns, getDMRToMultiReference, getEMFFormsDatabinding, getFontPropertiesStyleProperty, getGridDescription, getHorizontalBar, getImage, getImage, getRemoveButton, getSelectionIndex, getSWTColor, getTableHeightHint, getTableViewer, getTableViewerCreator, getTableViewerSWTBuilder, getVerticalBar, renderControl, rootDomainModelChanged, setTableViewer
canHandleControlProcessor, createLabel, createValidationIcon, defaultHandleControlProcessor, defaultHandleControlProcessorForCell, getDataBindingContext, getEditingDomain, getEMFFormsLabelProvider, getModelValue, getValidationBackgroundColor, getValidationForegroundColor, getValidationIcon, getVTViewTemplateProvider, hasLeftLabelAlignment, notifyChange, postInit, render
applyVisible, finalizeRendering, getControls, getDefaultFontName, init, preInit, setControlEnabled
checkRenderer, getReportService, getVElement, getViewModelContext
@Inject public TableControlDetailPanelRenderer(VTableControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabindingEMF emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, ImageRegistryService imageRegistryService, EMFFormsEditSupport emfFormsEditSupport)
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
protected org.eclipse.swt.widgets.Composite createControlComposite(org.eclipse.swt.widgets.Composite composite)
createControlComposite
in class TableControlSWTRenderer
composite
- the parent composite including the title/button barTableControlSWTRenderer.createControlComposite(org.eclipse.swt.widgets.Composite)
protected int getDetailPanelHeightHint()
protected org.eclipse.swt.widgets.Composite createDetailPanel(org.eclipse.swt.custom.ScrolledComposite composite)
composite
- the parentprotected VView getView()
VView
used for detail editing.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()
protected void deleteRows(List<org.eclipse.emf.ecore.EObject> deletionList, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
#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
TableControlSWTRenderer.deleteRows(java.util.List,
org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature)
Copyright © 2016. All rights reserved.