Class ContainerLocalTimeDialog<T>

java.lang.Object
com.amalgamasimulation.desktop.binding.dialogs.ContainerLocalTimeDialog<T>
Type Parameters:
T - the type of object in which the LocalTime is stored
Direct Known Subclasses:
EMFLocalTimeDialog

public class ContainerLocalTimeDialog<T> extends Object
The class is used to create and open a dialog for time editing.
Author:
Ionov Ivan
  • Field Details

    • currentType

      protected com.amalgamasimulation.desktop.binding.dialogs.AbstractLocalDateTimeDialog.DialogType currentType
      Dialog type. Depending on this dialog type, time and/or date editor(s) will be shown in the dialog
    • clearButtonExist

      protected boolean clearButtonExist
      Flag indicating whether the clear value button will be shown
    • shell

      protected org.eclipse.swt.widgets.Shell shell
  • Constructor Details

  • Method Details

    • setNewLocalTimeCreator

      public ContainerLocalTimeDialog<T> setNewLocalTimeCreator(Supplier<LocalTime> newLocalTimeCreator)
      Set function to get a new LocalTime
      Parameters:
      newLocalTimeCreator - - Function to get a new LocalTime if the container object is empty
      Returns:
      this object
    • getValue

      protected LocalDateTime getValue()
    • doAction

      protected void doAction(LocalDateTime newValue)
    • handler

      public ContainerLocalTimeDialog<T> handler(BiConsumer<T,LocalTime> handler)
    • setButtonClear

      public com.amalgamasimulation.desktop.binding.dialogs.AbstractLocalDateTimeDialog<LocalTime> 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.