Class EMFAutoCompleteTextEditingSupport.Builder<T,E,R extends IEMFColumn<T,E,R>>
java.lang.Object
com.amalgamasimulation.desktop.ui.builders.EMFAutoCompleteTextEditingSupport.Builder<T,E,R>
- Type Parameters:
T- type of row valueE- type of column value (cell value)R- column type
- All Implemented Interfaces:
EMFAutoCompleteTextEditingSupport.EditedFeatureBuilder<T,,E, R> EMFAutoCompleteTextEditingSupport.ElementsBuilder<T,,E, R> EMFAutoCompleteTextEditingSupport.FinalBuilder<T,,E, R> EMFAutoCompleteTextEditingSupport.NameBuilder<T,E, R>
- Enclosing class:
EMFAutoCompleteTextEditingSupport
public static class EMFAutoCompleteTextEditingSupport.Builder<T,E,R extends IEMFColumn<T,E,R>>
extends Object
implements EMFAutoCompleteTextEditingSupport.ElementsBuilder<T,E,R>, EMFAutoCompleteTextEditingSupport.EditedFeatureBuilder<T,E,R>, EMFAutoCompleteTextEditingSupport.NameBuilder<T,E,R>, EMFAutoCompleteTextEditingSupport.FinalBuilder<T,E,R>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Rprotected EMFAutoCompleteTextEditingSupport<T, E> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()This is the finalization method.Set function that returns a value that indicates whether the cell can be editedcomparator(Comparator<E> comparator) Add a comparator that is used to sort combobox values.static <T1,E1, R1 extends IEMFColumn<T1, E1, R1>>
EMFAutoCompleteTextEditingSupport.ElementsBuilder<T1, E1, R1> create(R1 columnDescriptor) Set the elements to be shown in the comboboxenableNullElement(String notSetLiteral) Add an element on top of other elements in the combobox to clear the table cell value.feature(org.eclipse.emf.ecore.EStructuralFeature feature) Set the feature pointing to the field that is being edited (a field in template class) filter(BiPredicate<T, E> filter) Add a filter.Add a filter.Set up the combobox elements naming.handler(BiConsumer<T, E> listener) Set function that will be executed after losing focus on the combo box editor or after pressing the Enter buttonnameFeature(org.eclipse.emf.ecore.EStructuralFeature nameFeature) Set up the combobox elements naming.nameFeatures(org.eclipse.emf.ecore.EStructuralFeature nameFeature, org.eclipse.emf.ecore.EStructuralFeature idFeature) Set up the combo box elements naming.strategy(ValidationStrategy<E, String> strategy) Set a strategy that firstly validates the entered value before placing it in the object, and secondly processes the value from the object before displaying it in the editor.
-
Field Details
-
columnDescriptor
-
editingSupport
-
-
Constructor Details
-
Builder
-
-
Method Details
-
create
public static <T1,E1, EMFAutoCompleteTextEditingSupport.ElementsBuilder<T1,R1 extends IEMFColumn<T1, E1, R1>> E1, createR1> (R1 columnDescriptor) -
elements
public EMFAutoCompleteTextEditingSupport.EditedFeatureBuilder<T,E, elementsR> (org.eclipse.core.databinding.observable.list.IObservableList<E> elements) Description copied from interface:EMFAutoCompleteTextEditingSupport.ElementsBuilderSet the elements to be shown in the combobox- Specified by:
elementsin interfaceEMFAutoCompleteTextEditingSupport.ElementsBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
elements- list of elements- Returns:
- builder object
-
feature
public EMFAutoCompleteTextEditingSupport.NameBuilder<T,E, featureR> (org.eclipse.emf.ecore.EStructuralFeature feature) Description copied from interface:EMFAutoCompleteTextEditingSupport.EditedFeatureBuilderSet the feature pointing to the field that is being edited (a field in template class) - Specified by:
featurein interfaceEMFAutoCompleteTextEditingSupport.EditedFeatureBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
feature- structural feature- Returns:
- builder object
-
nameFeature
public EMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, nameFeatureR> (org.eclipse.emf.ecore.EStructuralFeature nameFeature) Description copied from interface:EMFAutoCompleteTextEditingSupport.NameBuilderSet up the combobox elements naming. The structural feature value is used.- Specified by:
nameFeaturein interfaceEMFAutoCompleteTextEditingSupport.NameBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
nameFeature- feature of the combobox elements whose value will be displayed in the combobox- Returns:
- builder object
-
nameFeatures
public EMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, nameFeaturesR> (org.eclipse.emf.ecore.EStructuralFeature nameFeature, org.eclipse.emf.ecore.EStructuralFeature idFeature) Description copied from interface:EMFAutoCompleteTextEditingSupport.NameBuilderSet up the combo box elements naming. The structural feature value is used.- Specified by:
nameFeaturesin interfaceEMFAutoCompleteTextEditingSupport.NameBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
idFeature- feature of the combo box elements whose value will be displayed in the combo box- Returns:
- this object
-
format
public EMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, formatR> (Function<E, String> nameExtractor) Description copied from interface:EMFAutoCompleteTextEditingSupport.NameBuilderSet up the combobox elements naming. The name extractor.- Specified by:
formatin interfaceEMFAutoCompleteTextEditingSupport.NameBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
nameExtractor- function that converts a combobox element to a String displayed in the combobox- Returns:
- builder object
-
handler
Description copied from interface:EMFAutoCompleteTextEditingSupport.FinalBuilderSet function that will be executed after losing focus on the combo box editor or after pressing the Enter button- Specified by:
handlerin interfaceEMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
listener-- Returns:
- builder object
-
strategy
public EMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, strategyR> (ValidationStrategy<E, String> strategy) Description copied from interface:EMFAutoCompleteTextEditingSupport.FinalBuilderSet a strategy that firstly validates the entered value before placing it in the object, and secondly processes the value from the object before displaying it in the editor.- Specified by:
strategyin interfaceEMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
strategy-- Returns:
- builder object
-
enableNullElement
public EMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, enableNullElementR> (String notSetLiteral) Description copied from interface:EMFAutoCompleteTextEditingSupport.FinalBuilderAdd an element on top of other elements in the combobox to clear the table cell value.- Specified by:
enableNullElementin interfaceEMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
notSetLiteral- the label of the new combobox element that clears the cell value (typical values are: "", etc.) - Returns:
- the builder object
-
filter
Description copied from interface:EMFAutoCompleteTextEditingSupport.FinalBuilderAdd a filter. Only matching items will be displayed in the combobox.
Note that there may be at most one filter. If you call this method several times, only the last method call will be effective.- Specified by:
filterin interfaceEMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>>
-
filter
Description copied from interface:EMFAutoCompleteTextEditingSupport.FinalBuilderAdd a filter. Only matching items will be displayed in the combobox.
Note that there may be at most one filter. If you call this method several times, only the last method call will be effective.- Specified by:
filterin interfaceEMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>>
-
comparator
Description copied from interface:EMFAutoCompleteTextEditingSupport.FinalBuilderAdd a comparator that is used to sort combobox values.
Note that there may be at most one comparator. If you call this method several times, only the last method call will be effective.- Specified by:
comparatorin interfaceEMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>>
-
canEdit
Description copied from interface:EMFAutoCompleteTextEditingSupport.FinalBuilderSet function that returns a value that indicates whether the cell can be edited- Specified by:
canEditin interfaceEMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
canEdit-- Returns:
- builder object
-
build
Description copied from interface:EMFAutoCompleteTextEditingSupport.FinalBuilderThis is the finalization method. Call this method to install the auto-complete combobox editing support on a table column.- Specified by:
buildin interfaceEMFAutoCompleteTextEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>>
-