Class EMFLocalDateTimeEditingSupport.Builder<T,E,R extends IEMFColumn<T,E,R>>
java.lang.Object
com.amalgamasimulation.desktop.ui.builders.EMFLocalDateTimeEditingSupport.Builder<T,E,R>
- Type Parameters:
T- type of row valueE- type of column value (cell value)R- column type
- All Implemented Interfaces:
EMFLocalDateTimeEditingSupport.EditedFeatureBuilder<T,,E, R> EMFLocalDateTimeEditingSupport.FinalBuilder<T,,E, R> EMFLocalDateTimeEditingSupport.TypeDialogBuilder<T,E, R>
- Enclosing class:
EMFLocalDateTimeEditingSupport
public static class EMFLocalDateTimeEditingSupport.Builder<T,E,R extends IEMFColumn<T,E,R>>
extends Object
implements EMFLocalDateTimeEditingSupport.EditedFeatureBuilder<T,E,R>, EMFLocalDateTimeEditingSupport.FinalBuilder<T,E,R>, EMFLocalDateTimeEditingSupport.TypeDialogBuilder<T,E,R>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()This is the finalization method.buttonText(String text) Set text for button, if the image is set, the text is not shownSet function that returns a value that indicates whether the cell can be editedAdds a clear value button to the dialogstatic <T1,E1, R1 extends IEMFColumn<T1, E1, R1>>
EMFLocalDateTimeEditingSupport.EditedFeatureBuilder<T1, E1, R1> create(R1 columnDescriptor) feature(org.eclipse.emf.ecore.EStructuralFeature feature) Set the feature pointing to the field that is being edited (a field in template class) handler(BiConsumer<T, LocalDateTime> handler) Set function that will be executed after losing focus on the combo box editor or after pressing the Enter buttonicon(org.eclipse.swt.graphics.Image image) Set image for button, if the image is set, the text is not shownnewDateCreator(Supplier<LocalDateTime> newLocalDateTimeCreator) Set function that returns a new LocalDateTime, if old value == nullonlyDate()Enables a dialog type in which only the date is edited in the dialog.onlyTime()Enables a dialog type in which only the time is edited in the dialog.Provides an API for selecting the type of dialog
-
Field Details
-
columnDescriptor
-
editingSupport
-
-
Constructor Details
-
Builder
-
-
Method Details
-
create
public static <T1,E1, EMFLocalDateTimeEditingSupport.EditedFeatureBuilder<T1,R1 extends IEMFColumn<T1, E1, R1>> E1, createR1> (R1 columnDescriptor) -
feature
public EMFLocalDateTimeEditingSupport.FinalBuilder<T,E, featureR> (org.eclipse.emf.ecore.EStructuralFeature feature) Description copied from interface:EMFLocalDateTimeEditingSupport.EditedFeatureBuilderSet the feature pointing to the field that is being edited (a field in template class) - Specified by:
featurein interfaceEMFLocalDateTimeEditingSupport.EditedFeatureBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
feature- structural feature- Returns:
- builder object
-
handler
public EMFLocalDateTimeEditingSupport.FinalBuilder<T,E, handlerR> (BiConsumer<T, LocalDateTime> handler) Description copied from interface:EMFLocalDateTimeEditingSupport.FinalBuilderSet function that will be executed after losing focus on the combo box editor or after pressing the Enter button- Specified by:
handlerin interfaceEMFLocalDateTimeEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
handler- function to be executed- Returns:
- builder object
-
onlyTime
Description copied from interface:EMFLocalDateTimeEditingSupport.TypeDialogBuilderEnables a dialog type in which only the time is edited in the dialog.- Specified by:
onlyTimein interfaceEMFLocalDateTimeEditingSupport.TypeDialogBuilder<T,E, R extends IEMFColumn<T, E, R>> - Returns:
- builder object
-
onlyDate
Description copied from interface:EMFLocalDateTimeEditingSupport.TypeDialogBuilderEnables a dialog type in which only the date is edited in the dialog.- Specified by:
onlyDatein interfaceEMFLocalDateTimeEditingSupport.TypeDialogBuilder<T,E, R extends IEMFColumn<T, E, R>> - Returns:
- builder object
-
typeDialog
Description copied from interface:EMFLocalDateTimeEditingSupport.FinalBuilderProvides an API for selecting the type of dialog- Specified by:
typeDialogin interfaceEMFLocalDateTimeEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Returns:
- builder object
-
clearExistButton
Description copied from interface:EMFLocalDateTimeEditingSupport.FinalBuilderAdds a clear value button to the dialog- Specified by:
clearExistButtonin interfaceEMFLocalDateTimeEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Returns:
- builder object
-
newDateCreator
public EMFLocalDateTimeEditingSupport.FinalBuilder<T,E, newDateCreatorR> (Supplier<LocalDateTime> newLocalDateTimeCreator) Description copied from interface:EMFLocalDateTimeEditingSupport.FinalBuilderSet function that returns a new LocalDateTime, if old value == null- Specified by:
newDateCreatorin interfaceEMFLocalDateTimeEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
newLocalDateTimeCreator-- Returns:
- builder object
-
icon
public EMFLocalDateTimeEditingSupport.FinalBuilder<T,E, iconR> (org.eclipse.swt.graphics.Image image) Description copied from interface:EMFLocalDateTimeEditingSupport.FinalBuilderSet image for button, if the image is set, the text is not shown- Specified by:
iconin interfaceEMFLocalDateTimeEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
image-- Returns:
- builder object
-
buttonText
Description copied from interface:EMFLocalDateTimeEditingSupport.FinalBuilderSet text for button, if the image is set, the text is not shown- Specified by:
buttonTextin interfaceEMFLocalDateTimeEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
text-- Returns:
- builder object
-
canEdit
Description copied from interface:EMFLocalDateTimeEditingSupport.FinalBuilderSet function that returns a value that indicates whether the cell can be edited- Specified by:
canEditin interfaceEMFLocalDateTimeEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>> - Parameters:
canEdit-- Returns:
- builder object
-
build
Description copied from interface:EMFLocalDateTimeEditingSupport.FinalBuilderThis is the finalization method. Call this method to install the auto-complete combobox editing support on a table column.- Specified by:
buildin interfaceEMFLocalDateTimeEditingSupport.FinalBuilder<T,E, R extends IEMFColumn<T, E, R>>
-