Interface IUINullableValueComponent

All Superinterfaces:
IComponent, ICustomDataProvider, IGProp<GProp<?>[]>, IMessageBox, IPropCnr, IUIComp, IVSComponentListener, IVSComponentState, IVSFieldListener
All Known Implementing Classes:
EMLItemProp, EUIDateTime, MLItemProp, UIDateTime

public interface IUINullableValueComponent extends IUIComp
Interface implemented by value supporting components with a double, integer or date/time nullable value.
Author:
Mikael Andersson
  • Method Details

    • isNull

      default boolean isNull()
      Returns if the value is null, i.e. undefined.
      Returns:
      true if the value is null or undefined, false if defined or non-null.
    • isNullAllowed

      default boolean isNullAllowed()
      Returns if a null value is allowed, i.e. no date/time value is set and the UI component is blank.
      Returns:
      true if null is allowed, or false (default) if not allowed.
    • setNullAllowed

      default boolean setNullAllowed(boolean isNullAllowed)
      Sets the null value allowed flag, i.e. allows no date/time value to be set and the UI component is blank.

      Setting this parameter isNullAllowed to false when the value already is null will not affect the value.

      Parameters:
      isNullAllowed - Flag for null allowed.
      Returns:
      true if the setting changed, false for no change.
    • setValueToNull

      default boolean setValueToNull()
      Sets the value to null.
      Returns:
      true for value changed, false for no change.
      Throws:
      IllegalStateException - If the flag isNullAllowed() is false.