Class EMFTextIdEditingSupport<T,V>
java.lang.Object
org.eclipse.jface.viewers.EditingSupport
com.amalgamasimulation.desktop.binding.editingsupports.GenericEditingSupport<T,V>
com.amalgamasimulation.desktop.binding.editingsupports.EMFTextIdEditingSupport<T,V>
- Type Parameters:
T- type of row valueV- type of column value (cell value)
The class is used to edit field IDs in objects.
Allows automatic checking of entered values for uniqueness among this type of objects.
Used only with EMF (EObject).
- Author:
- Ionov Ivan
-
Field Summary
Fields inherited from class com.amalgamasimulation.desktop.binding.editingsupports.GenericEditingSupport
canEditCell, parent, viewer -
Constructor Summary
ConstructorsConstructorDescriptionEMFTextIdEditingSupport(org.eclipse.jface.viewers.ColumnViewer viewer, org.eclipse.swt.widgets.Composite parent) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.jface.viewers.CellEditorgetCellEditorInternal(T element) protected ObjectgetValueInternal(T element) setElements(org.eclipse.core.databinding.observable.list.IObservableList<T> elements) Set up the value elementssetIdFeature(org.eclipse.emf.ecore.EStructuralFeature idFeature) Set up the id featuresetSelectionListener(BiConsumer<T, V> selectionListener) Set up the selectionListenerprotected voidsetValueInternal(T element, V value) Methods inherited from class com.amalgamasimulation.desktop.binding.editingsupports.GenericEditingSupport
canEdit, canEditInternal, getCellEditor, getValue, initializeCellEditorValue, initializeCellEditorValueInternal, setCanEditCell, setValueMethods inherited from class org.eclipse.jface.viewers.EditingSupport
getViewer, saveCellEditorValue
-
Constructor Details
-
EMFTextIdEditingSupport
public EMFTextIdEditingSupport(org.eclipse.jface.viewers.ColumnViewer viewer, org.eclipse.swt.widgets.Composite parent)
-
-
Method Details
-
getCellEditorInternal
- Specified by:
getCellEditorInternalin classGenericEditingSupport<T,V>
-
getValueInternal
- Specified by:
getValueInternalin classGenericEditingSupport<T,V>
-
setValueInternal
- Specified by:
setValueInternalin classGenericEditingSupport<T,V>
-
setIdFeature
public EMFTextIdEditingSupport<T,V> setIdFeature(org.eclipse.emf.ecore.EStructuralFeature idFeature) Set up the id feature- Parameters:
idFeature- container reference to id value- Returns:
- this object
-
setElements
public EMFTextIdEditingSupport<T,V> setElements(org.eclipse.core.databinding.observable.list.IObservableList<T> elements) Set up the value elements- Parameters:
elements- List of elements among which the uniqueness of the ID will be checked- Returns:
- this object
-
setSelectionListener
Set up the selectionListener- Parameters:
selectionListener- function that will be executed after losing focus on the text editor or after pressing the Enter button- Returns:
- this object
-