public class TableControlSWTRenderer extends AbstractControlSWTRenderer<VTableControl>
Modifier and Type | Class and Description |
---|---|
protected class |
TableControlSWTRenderer.AutoSortModelChangeListener
Domain model change listener that re-sorts the table and reveals the added resp.
|
protected class |
TableControlSWTRenderer.CompactVerticallyTableControlSWTRendererCompositeBuilder
TableViewerCompositeBuilder which calls
the existing template method to create the validation label. |
class |
TableControlSWTRenderer.ECPCellLabelProvider
ECP specific cell label provider that does also implement
IColorProvider in
order to correctly. |
protected class |
TableControlSWTRenderer.ECPTableViewerComparator
The
ViewerComparator for this table which allows 3 states for sort order:
none, up and down. |
protected class |
TableControlSWTRenderer.TableControlComparator
This class combines the
ViewerComparator with the TableViewerComparator . |
protected class |
TableControlSWTRenderer.TableControlEditingSupportAndLabelProvider
Implements
EditingSupportCreator and CellLabelProviderFactory for the table control swt renderer. |
protected class |
TableControlSWTRenderer.TableControlSWTRendererCompositeBuilder
TableViewerCompositeBuilder which calls
the existing template method to create the validation label. |
protected class |
TableControlSWTRenderer.TableControlSWTRendererTableViewerCreator
TableViewerCreator for the table control swt renderer. |
Modifier and Type | Field and Description |
---|---|
protected static String |
FIXED_COLUMNS |
protected static String |
TABLE_CUSTOM_VARIANT |
protected static org.eclipse.swt.graphics.Point |
VALIDATION_PREFERRED_SIZE |
CUSTOM_VARIANT
Constructor and Description |
---|
TableControlSWTRenderer(VTableControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabindingEMF emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
ImageRegistryService imageRegistryService,
EMFFormsEditSupport emfFormsEditSupport)
Deprecated.
|
TableControlSWTRenderer(VTableControl vElement,
ViewModelContext viewContext,
ReportService reportService,
EMFFormsDatabindingEMF emfFormsDatabinding,
EMFFormsLabelProvider emfFormsLabelProvider,
VTViewTemplateProvider vtViewTemplateProvider,
ImageRegistryService imageRegistryService,
EMFFormsEditSupport emfFormsEditSupport,
EMFFormsLocalizationService localizationService)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
addAdditionalColumns(TableViewerSWTBuilder tableViewerSWTBuilder)
Override this method to add additional static columns at the beginning of the table.
|
protected int |
addButtonsToButtonBar(org.eclipse.swt.widgets.Composite buttonComposite)
Allows to add additional buttons to the button bar of the table control.
|
protected void |
addRow(org.eclipse.emf.ecore.EClass clazz,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Deprecated.
this method will be move to
AddRowAction in the future |
protected void |
applyEnable()
Allows implementers to set a control to enabled.
|
protected void |
applyReadOnly()
Marks a controls as readonly.
|
protected void |
applyUnchangeableFeature()
This method is applied if the control's feature is configured as unchangeable.
|
protected void |
applyValidation()
Allows implementers to display the validation state of the control.
|
protected void |
applyValidation(VDiagnostic oldDiagnostic,
VDiagnostic newDiagnostic)
Called before the
AbstractSWTRenderer.applyValidation() . |
protected boolean |
canEditObject(Object element)
Checks whether an element is editable or not.
|
protected int |
compare(org.eclipse.jface.viewers.Viewer viewer,
Object left,
Object right,
int direction,
int propertyIndex)
Get called by the
TableControlSWTRenderer.ECPTableViewerComparator in order to compare the given objects. |
protected int |
computeRequiredHeight(Integer visibleLines)
Returns the height in pixels required to display the given number of table items.
|
protected ActionConfiguration |
configureActions(TableRendererViewerActionContext actionContext)
Configure the actions applicable to this table viewer.
|
protected TableActionBar<? extends org.eclipse.jface.viewers.AbstractTableViewer> |
createActionBar(TableRendererViewerActionContext actionContext,
ActionConfiguration actionConfiguration)
Creates an action bar.
|
protected org.eclipse.jface.viewers.CellEditor |
createCellEditor(org.eclipse.emf.ecore.EObject tempInstance,
org.eclipse.emf.ecore.EStructuralFeature feature,
org.eclipse.swt.widgets.Composite table)
This is called in order to setup the editing support for a table column.
|
protected org.eclipse.jface.viewers.CellLabelProvider |
createCellLabelProvider(org.eclipse.emf.ecore.EStructuralFeature feature,
org.eclipse.jface.viewers.CellEditor cellEditor,
org.eclipse.core.databinding.observable.map.IObservableMap attributeMap,
VTableControl vTableControl,
VDomainModelReference dmr,
org.eclipse.swt.widgets.Control table)
|
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 VTBackgroundStyleProperty |
createDefaultBackgroundStyleProperty()
Creates the default
VTBackgroundStyleProperty . |
protected VTFontPropertiesStyleProperty |
createDefaultFontPropertiesStyleProperty()
Creates the default
VTFontPropertiesStyleProperty . |
protected VTTableStyleProperty |
createDefaultTableStyleProperty()
Creates the default
VTTableStyleProperty . |
protected VTTableValidationStyleProperty |
createDefaultTableValidationStyleProperty()
Creates the default
VTTableValidationStyleProperty . |
protected org.eclipse.swt.widgets.Control |
createLabel(org.eclipse.swt.widgets.Composite parent)
Create the
Control displaying the label of the current VControl . |
protected TableControlSWTRenderer.TableControlComparator |
createTableViewerComparator()
Creates a TableControlComparator.
|
protected TableViewerCompositeBuilder |
createTableViewerCompositeBuilder()
Creates the
TableViewerCompositeBuilder used to get Composite hierarchy for this table renderer. |
protected TableViewerSWTBuilder |
createTableViewerSWTBuilder(org.eclipse.swt.widgets.Composite parent,
org.eclipse.core.databinding.observable.list.IObservableList list,
org.eclipse.core.databinding.observable.value.IObservableValue labelText,
org.eclipse.core.databinding.observable.value.IObservableValue labelTooltipText,
TableViewerCompositeBuilder compositeBuilder,
org.eclipse.jface.databinding.viewers.ObservableListContentProvider cp,
TableControlSWTRenderer.ECPTableViewerComparator comparator,
TableActionBar<? extends org.eclipse.jface.viewers.AbstractTableViewer> actionBar)
|
protected TableViewerSWTBuilder |
createTableViewerSWTBuilder(org.eclipse.swt.widgets.Composite parent,
org.eclipse.core.databinding.observable.list.IObservableList list,
org.eclipse.core.databinding.observable.value.IObservableValue labelText,
org.eclipse.core.databinding.observable.value.IObservableValue labelTooltipText,
TableViewerCompositeBuilder compositeBuilder,
org.eclipse.jface.databinding.viewers.ObservableListContentProvider cp,
org.eclipse.jface.viewers.ViewerComparator comparator,
TableActionBar<? extends org.eclipse.jface.viewers.AbstractTableViewer> actionBar)
Creates a new
TableViewerSWTBuilder . |
protected TableRendererViewerActionContext |
createViewerActionContext()
Create the
ViewerActionContext for the table viewer. |
protected void |
deleteRows(List<org.eclipse.emf.ecore.EObject> deletionList,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
Deprecated.
this method will be moved to
RemoveRowAction in the future |
protected void |
deleteRowUserConfirmDialog(List<org.eclipse.emf.ecore.EObject> deletionList,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature structuralFeature,
org.eclipse.swt.widgets.Button addButton,
org.eclipse.swt.widgets.Button removeButton)
Deprecated.
this method will be moved to
RemoveRowAction in the future |
protected void |
dispose()
Disposes all resources used by the renderer.
|
protected org.eclipse.swt.widgets.Button |
getAddButton()
Deprecated.
use
getControlForAction(String) instead |
protected VTBackgroundStyleProperty |
getBackgroundStyleProperty()
Returns the
VTBackgroundStyleProperty . |
protected org.eclipse.emf.common.util.EList<VDomainModelReference> |
getColumnDomainModelReferences()
Retrieves this table's column DMRs from the table DMR.
|
protected org.eclipse.emf.ecore.EStructuralFeature |
getColumnFeature(int propertyIndex)
Find the feature for a specific index.
|
protected org.eclipse.swt.widgets.Item[] |
getColumns()
Returns an array of
items which are the columns in the table. |
Optional<org.eclipse.swt.widgets.Control> |
getControlForAction(String actionId)
Returns the control created to trigger a certain action.
|
protected VDomainModelReference |
getDMRToMultiReference() |
protected EMFFormsDatabindingEMF |
getEMFFormsDatabinding()
The
EMFFormsDatabinding to use. |
protected FeatureAwareComparator<org.eclipse.emf.common.util.Enumerator> |
getEnumeratorComparator() |
protected VTFontPropertiesStyleProperty |
getFontPropertiesStyleProperty()
Returns the
VTFontPropertiesStyleProperty . |
SWTGridDescription |
getGridDescription(SWTGridDescription gridDescription)
Returns the GridDescription for this Renderer.
|
protected org.eclipse.swt.widgets.ScrollBar |
getHorizontalBar()
Returns the receiver's horizontal scroll bar if it has one, and null if it does not.
|
protected org.eclipse.swt.graphics.Image |
getImage(String path)
Retrieve images from the
ImageRegistryService using a bundle relative path. |
protected org.eclipse.swt.graphics.Image |
getImage(URL url)
Retrieve images from the
ImageRegistryService using an URL . |
protected String[] |
getKeyBindingsForAction(String actionId,
String... defaultKeybindings)
Helper to extract the configured key bindings form the view template model.
|
protected org.eclipse.swt.widgets.Button |
getRemoveButton()
Deprecated.
use
getControlForAction(String) instead |
protected int |
getSelectionIndex()
Returns the zero-relative index of the item which is currently selected in the receiver, or -1 if no item is
selected.
|
protected Optional<org.eclipse.emf.ecore.EStructuralFeature.Setting> |
getSettingFromObservable(VDomainModelReference dmr,
org.eclipse.emf.ecore.EObject eObject)
Helper method which uses an EMFForms observable value to get the setting for the given
VDomainModelReference . |
protected Optional<org.eclipse.emf.ecore.EStructuralFeature> |
getSortColumnFeature()
Returns the current sort column feature.
|
protected org.eclipse.swt.graphics.Color |
getSWTColor(String colorHex)
Returns the
Color specified by the provided String. |
protected int |
getTableHeightHint()
Returns the preferred height for the table.
|
protected VTTableStyleProperty |
getTableStyleProperty()
Returns the
VTTableStyleProperty . |
protected VTTableValidationStyleProperty |
getTableValidationStyleProperty()
Returns the
VTTableValidationStyleProperty . |
protected org.eclipse.jface.viewers.AbstractTableViewer |
getTableViewer()
Returns the table viewer.
|
protected AbstractTableViewerComposite |
getTableViewerComposite()
Returns the
AbstractTableViewerComposite . |
protected TableViewerCreator<? extends org.eclipse.jface.viewers.AbstractTableViewer> |
getTableViewerCreator()
Creates a new instance of the
TableViewerCreator to be used. |
protected org.eclipse.swt.widgets.ScrollBar |
getVerticalBar()
Returns the receiver's vertical scroll bar if it has one, and null if it does not.
|
protected void |
postRefresh()
Post a request to refresh my viewer on the
asynchronous refresh manager.
|
protected void |
postRefresh(Runnable refreshRunnable)
Post a refresh request on the asynchronous refresh manager.
|
protected org.eclipse.swt.widgets.Control |
renderControl(SWTGridCell gridCell,
org.eclipse.swt.widgets.Composite parent)
Renders the passed
VElement . |
protected org.eclipse.swt.widgets.Control |
renderTableControl(SWTGridCell gridCell,
org.eclipse.swt.widgets.Composite parent)
Renders the Table Control.
|
boolean |
reveal(Object object)
Reeveal the given
object in my table. |
protected void |
rootDomainModelChanged()
This method is called in
AbstractControlSWTRenderer.notifyChange() when the root domain model of the view model context changes. |
protected void |
setSortColumnFeature(org.eclipse.emf.ecore.EStructuralFeature sortColumnFeature)
Set the column to use for sorting.
|
protected void |
setTableViewer(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
Sets the table viewer.
|
protected boolean |
shouldCreateCellEditor(Object element)
Defined whether a cell editor should be created or not.
|
protected void |
updateActionBar()
Update this table control's action bar if it is present.
|
protected void |
viewerSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
This method gets called when the selection on the
TableViewer (see getTableViewer() ) has
changed. |
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
protected static final String FIXED_COLUMNS
protected static final String TABLE_CUSTOM_VARIANT
protected static final org.eclipse.swt.graphics.Point VALIDATION_PREFERRED_SIZE
@Deprecated public TableControlSWTRenderer(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 EMFFormsDatabinding
emfFormsLabelProvider
- The EMFFormsLabelProvider
reportService
- The ReportService
vtViewTemplateProvider
- The VTViewTemplateProvider
imageRegistryService
- The ImageRegistryService
emfFormsEditSupport
- The EMFFormsEditSupport
@Inject public TableControlSWTRenderer(VTableControl vElement, ViewModelContext viewContext, ReportService reportService, EMFFormsDatabindingEMF emfFormsDatabinding, EMFFormsLabelProvider emfFormsLabelProvider, VTViewTemplateProvider vtViewTemplateProvider, ImageRegistryService imageRegistryService, EMFFormsEditSupport emfFormsEditSupport, EMFFormsLocalizationService localizationService)
vElement
- the view model element to be renderedviewContext
- the view contextemfFormsDatabinding
- The EMFFormsDatabinding
emfFormsLabelProvider
- The EMFFormsLabelProvider
reportService
- The ReportService
vtViewTemplateProvider
- The VTViewTemplateProvider
imageRegistryService
- The ImageRegistryService
emfFormsEditSupport
- The EMFFormsEditSupport
localizationService
- The EMFFormsLocalizationService
public SWTGridDescription getGridDescription(SWTGridDescription gridDescription)
AbstractSWTRenderer
getGridDescription
in class AbstractSWTRenderer<VTableControl>
gridDescription
- the current SWTGridDescription
protected EMFFormsDatabindingEMF getEMFFormsDatabinding()
AbstractControlSWTRenderer
EMFFormsDatabinding
to use.getEMFFormsDatabinding
in class AbstractControlSWTRenderer<VTableControl>
protected org.eclipse.swt.widgets.Control renderControl(SWTGridCell gridCell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
AbstractSWTRenderer
VElement
.renderControl
in class AbstractSWTRenderer<VTableControl>
gridCell
- the GridCell
of the control to renderparent
- the Composite
to render onControl
NoRendererFoundException
- this is thrown when a renderer cannot be foundNoPropertyDescriptorFoundExeption
- this is thrown when no property descriptor can be foundprotected org.eclipse.swt.widgets.Control createLabel(org.eclipse.swt.widgets.Composite parent)
AbstractControlSWTRenderer
Control
displaying the label of the current VControl
.createLabel
in class AbstractControlSWTRenderer<VTableControl>
parent
- the Composite
to render ontoControl
or nullprotected org.eclipse.swt.widgets.Control renderTableControl(SWTGridCell gridCell, org.eclipse.swt.widgets.Composite parent) throws NoRendererFoundException, NoPropertyDescriptorFoundExeption
RenderMode
is set to
RenderMode.DEFAULT
. Only renders the
Table Control without title and validation when renderMode is set to RenderMode.COMPACT_VERTICALLY
.gridCell
- the SWTGridCell
.parent
- the Composite
.Control
.NoRendererFoundException
- the NoRendererFoundException
.NoPropertyDescriptorFoundExeption
- the NoPropertyDescriptorFoundExeption
.protected TableControlSWTRenderer.TableControlComparator createTableViewerComparator()
protected TableRendererViewerActionContext createViewerActionContext()
ViewerActionContext
for the table viewer.TableRendererViewerActionContext
DatabindingFailedException
protected ActionConfiguration configureActions(TableRendererViewerActionContext actionContext)
actionContext
- the action contextActionConfigurationImpl
built using the ActionConfigurationBuilder
protected String[] getKeyBindingsForAction(String actionId, String... defaultKeybindings)
actionId
- the ID of the action to extract the key bindings fordefaultKeybindings
- the default key bindings to use in case there are no bindings configuredprotected TableActionBar<? extends org.eclipse.jface.viewers.AbstractTableViewer> createActionBar(TableRendererViewerActionContext actionContext, ActionConfiguration actionConfiguration)
actionContext
- the ViewerActionContext
to useactionConfiguration
- the ActionConfiguration
to useprotected TableViewerCompositeBuilder createTableViewerCompositeBuilder()
TableViewerCompositeBuilder
used to get Composite hierarchy for this table renderer. This
method can be overwritten by sub classes to customize the layout.TableViewerCompositeBuilder
@Deprecated protected TableViewerSWTBuilder createTableViewerSWTBuilder(org.eclipse.swt.widgets.Composite parent, org.eclipse.core.databinding.observable.list.IObservableList list, org.eclipse.core.databinding.observable.value.IObservableValue labelText, org.eclipse.core.databinding.observable.value.IObservableValue labelTooltipText, TableViewerCompositeBuilder compositeBuilder, org.eclipse.jface.databinding.viewers.ObservableListContentProvider cp, TableControlSWTRenderer.ECPTableViewerComparator comparator, TableActionBar<? extends org.eclipse.jface.viewers.AbstractTableViewer> actionBar)
createTableViewerSWTBuilder(Composite, IObservableList, IObservableValue, IObservableValue, TableViewerCompositeBuilder, ObservableListContentProvider, ViewerComparator, TableActionBar)
insteadTableViewerSWTBuilder
.parent
- the parent Composite
list
- the input objectlabelText
- the titlelabelTooltipText
- the tooltipcompositeBuilder
- the TableViewerCompositeBuilder
cp
- the content providercomparator
- the ViewerComparator
; has no effect if move up/down
functionality is enabledactionBar
- the ActionBar
TableViewerSWTBuilder
protected TableViewerSWTBuilder createTableViewerSWTBuilder(org.eclipse.swt.widgets.Composite parent, org.eclipse.core.databinding.observable.list.IObservableList list, org.eclipse.core.databinding.observable.value.IObservableValue labelText, org.eclipse.core.databinding.observable.value.IObservableValue labelTooltipText, TableViewerCompositeBuilder compositeBuilder, org.eclipse.jface.databinding.viewers.ObservableListContentProvider cp, org.eclipse.jface.viewers.ViewerComparator comparator, TableActionBar<? extends org.eclipse.jface.viewers.AbstractTableViewer> actionBar)
TableViewerSWTBuilder
.parent
- the parent Composite
list
- the input objectlabelText
- the titlelabelTooltipText
- the tooltipcompositeBuilder
- the TableViewerCompositeBuilder
cp
- the content providercomparator
- the ViewerComparator
; has no effect if move up/down
functionality is enabledactionBar
- the ActionBar
TableViewerSWTBuilder
protected TableViewerCreator<? extends org.eclipse.jface.viewers.AbstractTableViewer> getTableViewerCreator()
TableViewerCreator
to be used.TableViewerCreator
protected int addAdditionalColumns(TableViewerSWTBuilder tableViewerSWTBuilder)
tableViewerSWTBuilder
- the builderprotected int getSelectionIndex()
protected org.eclipse.swt.widgets.Item[] getColumns()
items
which are the columns in the table.protected org.eclipse.swt.widgets.ScrollBar getHorizontalBar()
protected org.eclipse.swt.widgets.ScrollBar getVerticalBar()
protected VDomainModelReference getDMRToMultiReference()
VDomainModelReference
which ends at the table settingprotected int addButtonsToButtonBar(org.eclipse.swt.widgets.Composite buttonComposite)
The default implementation does not add additional buttons.
buttonComposite
- the composite where the buttons are addedprotected org.eclipse.swt.widgets.Composite createControlComposite(org.eclipse.swt.widgets.Composite composite)
composite
- the parent composite including the title/button barprotected int getTableHeightHint()
protected int computeRequiredHeight(Integer visibleLines)
visibleLines
- the number of visible table itemsprotected org.eclipse.jface.viewers.AbstractTableViewer getTableViewer()
protected AbstractTableViewerComposite getTableViewerComposite()
AbstractTableViewerComposite
.protected void setTableViewer(org.eclipse.jface.viewers.AbstractTableViewer tableViewer)
tableViewer
- the viewerprotected void viewerSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
TableViewer
(see getTableViewer()
) has
changed.
If you override this method make sure to call super.
event
- the SelectionChangedEvent
protected org.eclipse.swt.graphics.Image getImage(URL url)
ImageRegistryService
using an URL
.url
- The URL
pointing to the imageprotected org.eclipse.swt.graphics.Image getImage(String path)
ImageRegistryService
using a bundle relative path.path
- The bundle relative path pointing to the imageprotected VTTableValidationStyleProperty getTableValidationStyleProperty()
VTTableValidationStyleProperty
.VTTableValidationStyleProperty
protected VTTableValidationStyleProperty createDefaultTableValidationStyleProperty()
VTTableValidationStyleProperty
.VTTableValidationStyleProperty
protected VTBackgroundStyleProperty getBackgroundStyleProperty()
VTBackgroundStyleProperty
.VTBackgroundStyleProperty
protected VTBackgroundStyleProperty createDefaultBackgroundStyleProperty()
VTBackgroundStyleProperty
.VTBackgroundStyleProperty
protected VTTableStyleProperty getTableStyleProperty()
VTTableStyleProperty
.VTTableStyleProperty
protected VTTableStyleProperty createDefaultTableStyleProperty()
VTTableStyleProperty
.VTTableStyleProperty
protected VTFontPropertiesStyleProperty getFontPropertiesStyleProperty()
VTFontPropertiesStyleProperty
.VTFontPropertiesStyleProperty
protected VTFontPropertiesStyleProperty createDefaultFontPropertiesStyleProperty()
VTFontPropertiesStyleProperty
.VTFontPropertiesStyleProperty
protected org.eclipse.swt.graphics.Color getSWTColor(String colorHex)
Color
specified by the provided String.colorHex
- the Hex String describing the colorColor
protected org.eclipse.emf.common.util.EList<VDomainModelReference> getColumnDomainModelReferences()
protected org.eclipse.jface.viewers.CellEditor createCellEditor(org.eclipse.emf.ecore.EObject tempInstance, org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.swt.widgets.Composite table)
tempInstance
- the temporary input instance of the tablefeature
- the feature of the columntable
- the table/parent@Deprecated protected void deleteRowUserConfirmDialog(List<org.eclipse.emf.ecore.EObject> deletionList, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature structuralFeature, org.eclipse.swt.widgets.Button addButton, org.eclipse.swt.widgets.Button removeButton)
RemoveRowAction
in the futuredeletionList
- the list of selected EObjects to deleteeObject
- The containment reference EObject
structuralFeature
- The containment reference EStructuralFeature
addButton
- the add buttonremoveButton
- the remove button@Deprecated protected void deleteRows(List<org.eclipse.emf.ecore.EObject> deletionList, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
RemoveRowAction
in the future#deleteRowUserConfirmDialog(List)
after the user confirmed to delete the selected
elements.deletionList
- the list of EObjects
to deleteeObject
- The containment reference EObject
structuralFeature
- The containment reference EStructuralFeature
@Deprecated protected void addRow(org.eclipse.emf.ecore.EClass clazz, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
AddRowAction
in the futureclazz
- the EClass
defining the EObject to createeObject
- The containment reference EObject
structuralFeature
- The containment reference EStructuralFeature
protected void applyValidation(VDiagnostic oldDiagnostic, VDiagnostic newDiagnostic)
AbstractSWTRenderer
AbstractSWTRenderer.applyValidation()
. This method allows to create a diff between the old diagnostic and
the new diagnostic and thus improve the performance of the overlay apply by triggering it only on the relevant
elements.applyValidation
in class AbstractSWTRenderer<VTableControl>
oldDiagnostic
- The previous VDiagnostic
newDiagnostic
- The current VDiagnostic
protected void applyValidation()
AbstractSWTRenderer
applyValidation
in class AbstractSWTRenderer<VTableControl>
protected void postRefresh()
getTableViewer()
,
ViewerRefreshManager
protected void postRefresh(Runnable refreshRunnable)
refreshRunnable
- the refresh operation to executeViewerRefreshManager
@Deprecated protected org.eclipse.swt.widgets.Button getAddButton()
getControlForAction(String)
instead@Deprecated protected org.eclipse.swt.widgets.Button getRemoveButton()
getControlForAction(String)
insteadpublic Optional<org.eclipse.swt.widgets.Control> getControlForAction(String actionId)
actionId
- the action ID of the action that is bound to the controlprotected Optional<org.eclipse.emf.ecore.EStructuralFeature.Setting> getSettingFromObservable(VDomainModelReference dmr, org.eclipse.emf.ecore.EObject eObject)
VDomainModelReference
.dmr
- the VDomainModelReference
eObject
- the EObject
to get the setting forprotected void applyEnable()
AbstractControlSWTRenderer
applyEnable
in class AbstractControlSWTRenderer<VTableControl>
AbstractSWTRenderer.applyEnable()
protected void applyReadOnly()
AbstractControlSWTRenderer
applyReadOnly
in class AbstractControlSWTRenderer<VTableControl>
AbstractSWTRenderer.applyReadOnly()
protected void applyUnchangeableFeature()
AbstractControlSWTRenderer
applyUnchangeableFeature
in class AbstractControlSWTRenderer<VTableControl>
protected void updateActionBar()
protected void dispose()
AbstractSWTRenderer
dispose
in class AbstractControlSWTRenderer<VTableControl>
protected int compare(org.eclipse.jface.viewers.Viewer viewer, Object left, Object right, int direction, int propertyIndex)
TableControlSWTRenderer.ECPTableViewerComparator
in order to compare the given objects.viewer
- the table viewerleft
- the first object of the comparisonright
- the second object of the comparisonpropertyIndex
- index of the selection column. the index is aligned with the index of the associated column
domain model referencedirection
- 0 (no sorting = insertion order := SWT.NONE
), 1 (ascending := SWT.DOWN
) or 2
(descending := SWT.UP
) according to the indication displayed at
the table column.0
if the first element is
equal to the second element; and a positive number if the first
element is greater than the second elementprotected void rootDomainModelChanged() throws DatabindingFailedException
AbstractControlSWTRenderer
AbstractControlSWTRenderer.notifyChange()
when the root domain model of the view model context changes.rootDomainModelChanged
in class AbstractControlSWTRenderer<VTableControl>
DatabindingFailedException
- If the databinding failedprotected boolean canEditObject(Object element)
element
- The list entry to be checkedprotected boolean shouldCreateCellEditor(Object element)
element
- The table entry to be checkedprotected org.eclipse.jface.viewers.CellLabelProvider createCellLabelProvider(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.jface.viewers.CellEditor cellEditor, org.eclipse.core.databinding.observable.map.IObservableMap attributeMap, VTableControl vTableControl, VDomainModelReference dmr, org.eclipse.swt.widgets.Control table)
feature
- the feature of the columncellEditor
- the cell editor for the columnattributeMap
- the attribute map displayed in the tablevTableControl
- the table view model elementdmr
- the domain model reference of the columntable
- the table controlCellLabelProvider
of the columnprotected FeatureAwareComparator<org.eclipse.emf.common.util.Enumerator> getEnumeratorComparator()
FeatureAwareComparator
used to compare enum values
when sorting the tablepublic boolean reveal(Object object)
object
in my table.object
- an object to revealprotected Optional<org.eclipse.emf.ecore.EStructuralFeature> getSortColumnFeature()
Optional
containing the feature used for sortingprotected void setSortColumnFeature(org.eclipse.emf.ecore.EStructuralFeature sortColumnFeature)
sortColumnFeature
- an optional containing the feature to use for sortingprotected org.eclipse.emf.ecore.EStructuralFeature getColumnFeature(int propertyIndex)
propertyIndex
- The index to find the feature forEStructuralFeature
for the provided indexCopyright © 2019. All rights reserved.