Package com.uc4.api.prompt
Class NumberElement
java.lang.Object
com.uc4.api.objects.PromptElement
com.uc4.api.prompt.NumberElement
- All Implemented Interfaces:
PromptInterfaces.Caption,PromptInterfaces.Constraints<Integer>,PromptInterfaces.DataReference,PromptInterfaces.Focus,PromptInterfaces.Locked,PromptInterfaces.QuoteCharacter
public class NumberElement
extends PromptElement
implements PromptInterfaces.Caption, PromptInterfaces.DataReference, PromptInterfaces.Focus, PromptInterfaces.QuoteCharacter, PromptInterfaces.Locked, PromptInterfaces.Constraints<Integer>
Number field.
-
Field Summary
Fields inherited from class com.uc4.api.objects.PromptElement
aliasMap, list, properties -
Constructor Summary
ConstructorsConstructorDescriptionNumberElement(String variableName, UC4ObjectName reference) Creates a new number field. -
Method Summary
Modifier and TypeMethodDescriptionintDeprecated.use getMaxValue() insteadReturns the maximum value.intDeprecated.Use getMinValue() insteadReturns the minimum value.charReturns the character for a quote.protected StringReturns the tooltip of this Prompt Element.booleanhasFocus()Returnstrueif the focus is set.booleanisLocked()Returnstrueif this Prompt Element is locked.protected StringvoidsetCaption(String caption) Sets the caption of this prompt element.voidSets a UC4 VARA Object which contains a list of valid entries for this prompt element.voidsetFocus(boolean value) Sets the cursor focus: The cursor is placed at this control if the value istrue.voidsetLocked(boolean locked) Lock or unlocks this element.voidsetMaximumValue(int value) Deprecated.Use setMaxValue() insteadvoidsetMaxValue(Integer value) Sets the maximum value.voidsetMinimumValue(int min) Deprecated.Use setMinValue() insteadvoidsetMinValue(Integer min) Sets the minimum value.voidsetQuoteCharacter(char c) Sets the character for a quote, for example ' or ".voidsetTooltip(String tooltip) Sets the tooltip of this Prompt Element.Methods inherited from class com.uc4.api.objects.PromptElement
getCustomField, getMessageInsert, getMessageNumber, getMode, getProperty, getValue, getValues, getVariable, hasList, isAltView, setAltView, setCustomField, setRawValue, setValue, setValues, setVariable, store, storeAdditionalPromptData, storeDefaultValues, toString, updateDefaultValue, validateForExecute, validateId
-
Constructor Details
-
NumberElement
Creates a new number field.- Parameters:
variableName- Name of the script variablereference- Name of the reference variable
-
-
Method Details
-
setQuoteCharacter
public void setQuoteCharacter(char c) Sets the character for a quote, for example ' or ".- Specified by:
setQuoteCharacterin interfacePromptInterfaces.QuoteCharacter- Parameters:
c- Character
-
getQuoteCharacter
public char getQuoteCharacter()Returns the character for a quote.- Specified by:
getQuoteCharacterin interfacePromptInterfaces.QuoteCharacter- Returns:
- for example ' or "
-
getTagName
- Specified by:
getTagNamein classPromptElement
-
getTooltip
Returns the tooltip of this Prompt Element.- Overrides:
getTooltipin classPromptElement- Returns:
- Tooltip
-
setTooltip
Sets the tooltip of this Prompt Element.- Overrides:
setTooltipin classPromptElement- Parameters:
tooltip- Tooltip text
-
setDataReference
Sets a UC4 VARA Object which contains a list of valid entries for this prompt element.- Specified by:
setDataReferencein interfacePromptInterfaces.DataReference- Parameters:
vara- Name of a Variable Object
-
getDataReference
- Specified by:
getDataReferencein interfacePromptInterfaces.DataReference- Returns:
- Name of a Variable Object
-
setMinValue
Sets the minimum value.- Specified by:
setMinValuein interfacePromptInterfaces.Constraints<Integer>- Parameters:
min- Min value ornullto disable the lower limit.
-
getMinValue
Returns the minimum value.- Specified by:
getMinValuein interfacePromptInterfaces.Constraints<Integer>- Returns:
- Min value or
nullif there is no lower limit.
-
setMinimumValue
Deprecated.Use setMinValue() insteadSets the minimum value.- Parameters:
min- Min value or-1to disable the lower limit.
-
getMinimumValue
Deprecated.Use getMinValue() insteadReturns the minimum value.- Returns:
- Min value or
-1if there is no lower limit.
-
getCaption
- Specified by:
getCaptionin interfacePromptInterfaces.Caption- Returns:
- Caption of this prompt element
-
setCaption
Sets the caption of this prompt element.- Specified by:
setCaptionin interfacePromptInterfaces.Caption- Parameters:
caption- Caption
-
isLocked
public boolean isLocked()Returnstrueif this Prompt Element is locked. In this case a user cannot change the default value in the Prompt-Screen.- Specified by:
isLockedin interfacePromptInterfaces.Locked- Overrides:
isLockedin 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:
setLockedin interfacePromptInterfaces.Locked- Overrides:
setLockedin classPromptElement- Parameters:
locked- true if locked, false if the user can change the value of the Prompt Element
-
hasFocus
public boolean hasFocus()Returnstrueif 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:
hasFocusin 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:
setFocusin interfacePromptInterfaces.Focus- Parameters:
value- true if the cursor should be set in this Prompt Element, false otherwise
-
setMaxValue
Sets the maximum value.- Specified by:
setMaxValuein interfacePromptInterfaces.Constraints<Integer>- Parameters:
value- Max value ornullin order to disable the upper limit.
-
setMaximumValue
Deprecated.Use setMaxValue() insteadSets the maximum value.- Parameters:
value- Max value or-1in order to disable the upper limit.
-
getMaxValue
Returns the maximum value.- Specified by:
getMaxValuein interfacePromptInterfaces.Constraints<Integer>- Returns:
- Max value or
-1if no limit is set.
-
getMaximumValue
Deprecated.use getMaxValue() insteadReturns the maximum value.- Returns:
- Max value or
-1if no limit is set.
-
listParam
- Overrides:
listParamin classPromptElement
-