Package com.uc4.api.prompt
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
public class DateElement extends PromptElement implements PromptInterfaces.Caption, PromptInterfaces.Focus, PromptInterfaces.OutputFormat, PromptInterfaces.DataReference, PromptInterfaces.Locked, PromptInterfaces.Constraints<DateTime>
This class represents a date prompt element.
-
-
Field Summary
-
Fields inherited from class com.uc4.api.objects.PromptElement
aliasMap, list, properties
-
-
Constructor Summary
Constructors Constructor Description DateElement(java.lang.String variableName, UC4ObjectName reference)
Creates a newDateElement
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description @Nullable CalendarCondition
getCalendarCondition()
java.lang.String
getCaption()
UC4ObjectName
getDataReference()
DateTime
getMaximumValue()
Deprecated.use getMaxValue insteadDateTime
getMaxValue()
DateTime
getMinimumValue()
Deprecated.use getMinValue insteadDateTime
getMinValue()
java.lang.String
getOutputFormat()
protected java.lang.String
getTagName()
boolean
hasFocus()
Returnstrue
if the focus is set.boolean
isLocked()
Returnstrue
if this Prompt Element is locked.protected java.lang.String
listParam()
void
setCalendarCondition(@Nullable CalendarCondition cond)
Sets the calendar and keyword for valid inputs.void
setCaption(java.lang.String caption)
Sets the caption of this prompt element.void
setDataReference(UC4ObjectName vara)
Sets a VARA Object which contains a list of valid entries for this prompt element.void
setFocus(boolean value)
Sets the cursor focus: The cursor is placed at this control if the value istrue
.void
setLocked(boolean locked)
Lock or unlocks this element.void
setMaximumValue(DateTime value)
Deprecated.use setMaxValue insteadvoid
setMaxValue(DateTime maxValue)
void
setMinimumValue(DateTime value)
Deprecated.use setMinValue insteadvoid
setMinValue(DateTime minValue)
void
setOutputFormat(@Nullable java.lang.String outputformat)
Sets the output format.void
setValue(DateTime value)
Sets the default value.-
Methods inherited from class com.uc4.api.objects.PromptElement
getCustomField, getMessageInsert, getMessageNumber, getMode, getProperty, getTooltip, getValue, getValues, getVariable, hasList, isAltView, setAltView, setCustomField, setTooltip, setValue, setValues, setVariable, store, storeAdditionalPromptData, storeDefaultValues, toString, updateDefaultValue, validateForExecute, validateId
-
-
-
-
Constructor Detail
-
DateElement
public DateElement(java.lang.String variableName, UC4ObjectName reference)
Creates a newDateElement
.- Parameters:
variableName
- Name of the script variablereference
- Name of the reference variable
-
-
Method Detail
-
listParam
protected java.lang.String listParam()
- Overrides:
listParam
in classPromptElement
-
hasFocus
public boolean hasFocus()
Returnstrue
if the focus is set. The cursor is placed at this control if the value istrue
. 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 interfacePromptInterfaces.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 istrue
. 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 interfacePromptInterfaces.Focus
- Parameters:
value
- true if the cursor should be set in this Prompt Element, false otherwise
-
isLocked
public boolean isLocked()
Returnstrue
if this Prompt Element is locked. In this case a user cannot change the default value in the Prompt-Screen.- Specified by:
isLocked
in interfacePromptInterfaces.Locked
- Overrides:
isLocked
in classPromptElement
- 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 interfacePromptInterfaces.Locked
- Overrides:
setLocked
in classPromptElement
- Parameters:
locked
- true if locked, false if the user can change the value of the Prompt Element
-
getCaption
public java.lang.String getCaption()
- Specified by:
getCaption
in interfacePromptInterfaces.Caption
- Returns:
- Caption of this prompt element
-
setCaption
public void setCaption(java.lang.String caption)
Sets the caption of this prompt element.- Specified by:
setCaption
in interfacePromptInterfaces.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 interfacePromptInterfaces.DataReference
- Parameters:
vara
- Name of a Variable Object
-
getDataReference
public UC4ObjectName getDataReference()
- Specified by:
getDataReference
in interfacePromptInterfaces.DataReference
- Returns:
- Name of a Variable Object
-
setMinimumValue
@Deprecated public void setMinimumValue(DateTime value)
Deprecated.use setMinValue insteadSets the minimum value.- Parameters:
value
- Min value
-
getMinimumValue
@Deprecated public DateTime getMinimumValue()
Deprecated.use getMinValue insteadReturns the minimum value.- Returns:
- Min value
-
setMaximumValue
@Deprecated public void setMaximumValue(DateTime value)
Deprecated.use setMaxValue insteadSets the maximum value.- Parameters:
value
- Max value
-
getMaximumValue
@Deprecated public DateTime getMaximumValue()
Deprecated.use getMaxValue insteadReturns the maximum value.- Returns:
- Max value
-
getOutputFormat
public java.lang.String getOutputFormat()
- Specified by:
getOutputFormat
in interfacePromptInterfaces.OutputFormat
- Returns:
- Output format
-
setOutputFormat
public void setOutputFormat(@Nullable java.lang.String outputformat)
Sets the output format.- Specified by:
setOutputFormat
in interfacePromptInterfaces.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 java.lang.String getTagName()
- Specified by:
getTagName
in classPromptElement
-
setMaxValue
public void setMaxValue(DateTime maxValue)
- Specified by:
setMaxValue
in interfacePromptInterfaces.Constraints<DateTime>
- Parameters:
maxValue
- set maximum value @nullable
-
setMinValue
public void setMinValue(DateTime minValue)
- Specified by:
setMinValue
in interfacePromptInterfaces.Constraints<DateTime>
- Parameters:
minValue
- set minimum value @nullable
-
getMaxValue
public DateTime getMaxValue()
- Specified by:
getMaxValue
in interfacePromptInterfaces.Constraints<DateTime>
- Returns:
- maximum value @nullable
-
getMinValue
public DateTime getMinValue()
- Specified by:
getMinValue
in interfacePromptInterfaces.Constraints<DateTime>
- Returns:
- minimum value @nullable
-
-