Class ContainerLocalDateDialog<T>
java.lang.Object
com.amalgamasimulation.desktop.binding.dialogs.ContainerLocalDateDialog<T>
- Type Parameters:
T- the type of object in which the LocalDate is stored
- Direct Known Subclasses:
EMFLocalDateDialog
The class is used to create and open a dialog for editing a date.
- Author:
- Ionov Ivan
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanFlag indicating whether the clear value button will be shownprotected com.amalgamasimulation.desktop.binding.dialogs.AbstractLocalDateTimeDialog.DialogTypeDialog type.protected org.eclipse.swt.widgets.Shell -
Constructor Summary
ConstructorsConstructorDescriptionContainerLocalDateDialog(org.eclipse.swt.widgets.Shell shell, T owner, Function<T, LocalDate> getter, BiConsumer<T, LocalDate> handler) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoAction(LocalDateTime newValue) protected LocalDateTimegetValue()voidopen()Open dialog with date\time editors.com.amalgamasimulation.desktop.binding.dialogs.AbstractLocalDateTimeDialog<LocalDate> setButtonClear(boolean clearButtonExist) Set flag clearButtonExistsetNewLocalDateCreator(Supplier<LocalDate> newLocalDateCreator) Set function to get a new LocalDate
-
Field Details
-
currentType
protected com.amalgamasimulation.desktop.binding.dialogs.AbstractLocalDateTimeDialog.DialogType currentTypeDialog type. Depending on this dialog type, time and/or date editor(s) will be shown in the dialog -
clearButtonExist
protected boolean clearButtonExistFlag indicating whether the clear value button will be shown -
shell
protected org.eclipse.swt.widgets.Shell shell
-
-
Constructor Details
-
ContainerLocalDateDialog
-
-
Method Details
-
setNewLocalDateCreator
Set function to get a new LocalDate- Parameters:
newLocalDateCreator- - Function to get a new LocalDate if the container object is empty- Returns:
- this object
-
getValue
-
doAction
-
setButtonClear
public com.amalgamasimulation.desktop.binding.dialogs.AbstractLocalDateTimeDialog<LocalDate> setButtonClear(boolean clearButtonExist) Set flag clearButtonExist- Parameters:
clearButtonExist- Flag indicating whether the clear value button will be shown- Returns:
- this object
-
open
public void open()Open dialog with date\time editors.
-