Class LocalDateTimeDialog

java.lang.Object
com.amalgamasimulation.desktop.binding.dialogs.LocalDateTimeDialog

public class LocalDateTimeDialog extends Object
The class is used to create and open a dialog for editing LocalDateTime.
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

    • getValue

      protected LocalDateTime getValue()
    • doAction

      protected void doAction(LocalDateTime newValue)
    • setOnlyDate

      public LocalDateTimeDialog setOnlyDate()
      Sets the dialog type to DATE. Only the date editor will be shown
      Returns:
      this object
    • setOnlyTime

      public LocalDateTimeDialog setOnlyTime()
      Sets the dialog type to TIME. Only the time editor will be shown
      Returns:
      this object
    • setNewLocalDateTimeCreator

      public LocalDateTimeDialog setNewLocalDateTimeCreator(Supplier<LocalDateTime> newLocalDateTimeCreator)
      Set function to get a new LocalDateTime
      Parameters:
      newLocalDateTimeCreator - - Function to get a new LocalDateTime if the container object is empty
      Returns:
      this object
    • openAndGetValue

      public LocalDateTime openAndGetValue()
      Opens the dialog and blocks until the user closes it.
      Returns:
      selected value on OK, null on Cancel or Clear
    • setButtonClear

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