Interface IUIDateTimeComponent

All Superinterfaces:
IComponent, ICustomDataProvider, IGProp<GProp<?>[]>, IMessageBox, IPropCnr, IUIComp, IUIValueComponent, IVSComponentListener, IVSComponentState, IVSFieldListener
All Known Subinterfaces:
IUIDateValueComponent, IUITimeValueComponent
All Known Implementing Classes:
EUICalendar, EUIDateTime, UICalendar, UIDateTime

public interface IUIDateTimeComponent extends IUIValueComponent
Interface implemented by value supporting components with a date/time value.
Author:
Christopher Mindus
  • Method Details

    • createValueProp

      default DateTimeProp createValueProp()
      Component must return the value property to use with the name Atom.VALUE.
      Specified by:
      createValueProp in interface IUIValueComponent
      Returns:
      DateTimeProp for date/time support,
    • isDateValueSupported

      boolean isDateValueSupported()
      Returns if the implementation supports date.
      Returns:
      true if date is supported, false for only time support.
    • isDateValueRequired

      default boolean isDateValueRequired()
      Returns if the implementation requires a date in the value component.
      Returns:
      true if date is required, false otherwise.
    • isTimeValueSupported

      boolean isTimeValueSupported()
      Returns if the implementation supports time.
      Returns:
      true if time is supported, false for only date support.
    • isTimeValueRequired

      default boolean isTimeValueRequired()
      Returns if the implementation requires a time in the value component.
      Returns:
      true if time is required, false otherwise.
    • setValue

      boolean setValue(GDateTime value) throws IllegalArgumentException
      Sets the value of the component as a date/time value.
      Parameters:
      value - The date/time value.
      Returns:
      true for value changed, false for no change.
      Throws:
      IllegalArgumentException - If the value is out of range or if the date/time value does not contain the time or date parts required by the component.
    • getValue

      default GDateTime getValue() throws NotFoundException
      Gets the value of the component as a GDateTime.
      Returns:
      The GDateTime value of the component.
      Throws:
      NotFoundException - If the value is undefined.
    • getValueOrDefault

      default GDateTime getValueOrDefault()
      Gets the value of the component as without throwing an exception as opposed to getValue() but falls back to the default value if undefined.
      Returns:
      The value of the component, or the default value if undefined.
    • getDefaultValue

      GDateTime getDefaultValue()
      Gets the default value of the component as a GDateTime.
      Returns:
      The default GDateTime value of the component.