Class DateElement

java.lang.Object
com.uc4.api.objects.PromptElement
com.uc4.api.prompt.DateElement
All Implemented Interfaces:
PromptInterfaces.Caption, PromptInterfaces.Constraints<DateTime>, PromptInterfaces.DataReference, PromptInterfaces.Focus, PromptInterfaces.Locked, PromptInterfaces.OutputFormat
Direct Known Subclasses:
TimeStampElement

This class represents a date prompt element.
  • Constructor Details

    • DateElement

      public DateElement(String variableName, UC4ObjectName reference)
      Creates a new DateElement.
      Parameters:
      variableName - Name of the script variable
      reference - Name of the reference variable
  • Method Details

    • listParam

      protected String listParam()
      Overrides:
      listParam in class PromptElement
    • hasFocus

      public boolean hasFocus()
      Returns true if the focus is set. The cursor is placed at this control if the value is true. It may only be defined for one control in the PromptSet. If this flag is defined for several Controls of a PromptSet the last Control that got the flag wins.
      Specified by:
      hasFocus in interface PromptInterfaces.Focus
      Returns:
      true if the cursor should be set in this Prompt Element, false otherwise
    • setFocus

      public void setFocus(boolean value)
      Sets the cursor focus: The cursor is placed at this control if the value is true. It may only be defined for one control in the PromptSet. If this flag is defined for several Controls of a PromptSet the last Control that got the flag wins.
      Specified by:
      setFocus in interface PromptInterfaces.Focus
      Parameters:
      value - true if the cursor should be set in this Prompt Element, false otherwise
    • isLocked

      public boolean isLocked()
      Returns true if this Prompt Element is locked. In this case a user cannot change the default value in the Prompt-Screen.
      Specified by:
      isLocked in interface PromptInterfaces.Locked
      Overrides:
      isLocked in class PromptElement
      Returns:
      true if locked, false if the user can change the value of the Prompt Element
    • setLocked

      public void setLocked(boolean locked)
      Lock or unlocks this element. A user cannot change the default value in the Prompt-Screen if a control is locked.
      Specified by:
      setLocked in interface PromptInterfaces.Locked
      Overrides:
      setLocked in class PromptElement
      Parameters:
      locked - true if locked, false if the user can change the value of the Prompt Element
    • getCaption

      public String getCaption()
      Specified by:
      getCaption in interface PromptInterfaces.Caption
      Returns:
      Caption of this prompt element
    • setCaption

      public void setCaption(String caption)
      Sets the caption of this prompt element.
      Specified by:
      setCaption in interface PromptInterfaces.Caption
      Parameters:
      caption - Caption
    • setDataReference

      public void setDataReference(UC4ObjectName vara)
      Sets a VARA Object which contains a list of valid entries for this prompt element.
      Specified by:
      setDataReference in interface PromptInterfaces.DataReference
      Parameters:
      vara - Name of a Variable Object
    • getDataReference

      public UC4ObjectName getDataReference()
      Specified by:
      getDataReference in interface PromptInterfaces.DataReference
      Returns:
      Name of a Variable Object
    • setMinimumValue

      @Deprecated public void setMinimumValue(DateTime value)
      Deprecated.
      use setMinValue instead
      Sets the minimum value.
      Parameters:
      value - Min value
    • getMinimumValue

      @Deprecated public DateTime getMinimumValue()
      Deprecated.
      use getMinValue instead
      Returns the minimum value.
      Returns:
      Min value
    • setMaximumValue

      @Deprecated public void setMaximumValue(DateTime value)
      Deprecated.
      use setMaxValue instead
      Sets the maximum value.
      Parameters:
      value - Max value
    • getMaximumValue

      @Deprecated public DateTime getMaximumValue()
      Deprecated.
      use getMaxValue instead
      Returns the maximum value.
      Returns:
      Max value
    • getOutputFormat

      public String getOutputFormat()
      Specified by:
      getOutputFormat in interface PromptInterfaces.OutputFormat
      Returns:
      Output format
    • setOutputFormat

      public void setOutputFormat(@Nullable String outputformat)
      Sets the output format.
      Specified by:
      setOutputFormat in interface PromptInterfaces.OutputFormat
      Parameters:
      outputformat - Output format
    • setCalendarCondition

      public void setCalendarCondition(@Nullable CalendarCondition cond)
      Sets the calendar and keyword for valid inputs.
      Parameters:
      cond - the calendar condition, may be null
    • getCalendarCondition

      public @Nullable CalendarCondition getCalendarCondition()
      Returns:
      calendar condition, null if calendar or key property is null
    • setValue

      public void setValue(DateTime value)
      Sets the default value.
      Parameters:
      value - Value
    • getTagName

      protected String getTagName()
      Specified by:
      getTagName in class PromptElement
    • setMaxValue

      public void setMaxValue(DateTime maxValue)
      Specified by:
      setMaxValue in interface PromptInterfaces.Constraints<DateTime>
      Parameters:
      maxValue - set maximum value @nullable
    • setMinValue

      public void setMinValue(DateTime minValue)
      Specified by:
      setMinValue in interface PromptInterfaces.Constraints<DateTime>
      Parameters:
      minValue - set minimum value @nullable
    • getMaxValue

      public DateTime getMaxValue()
      Specified by:
      getMaxValue in interface PromptInterfaces.Constraints<DateTime>
      Returns:
      maximum value @nullable
    • getMinValue

      public DateTime getMinValue()
      Specified by:
      getMinValue in interface PromptInterfaces.Constraints<DateTime>
      Returns:
      minimum value @nullable