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<java.lang.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<java.lang.Integer>
Number field.
-
-
Field Summary
-
Fields inherited from class com.uc4.api.objects.PromptElement
aliasMap, list, properties
-
-
Constructor Summary
Constructors Constructor Description NumberElement(java.lang.String variableName, UC4ObjectName reference)
Creates a new number field.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getCaption()
UC4ObjectName
getDataReference()
int
getMaximumValue()
Deprecated.use getMaxValue() insteadjava.lang.Integer
getMaxValue()
Returns the maximum value.int
getMinimumValue()
Deprecated.Use getMinValue() insteadjava.lang.Integer
getMinValue()
Returns the minimum value.char
getQuoteCharacter()
Returns the character for a quote.protected java.lang.String
getTagName()
java.lang.String
getTooltip()
Returns the tooltip of this Prompt Element.boolean
hasFocus()
Returnstrue
if the focus is set.boolean
isLocked()
Returnstrue
if this Prompt Element is locked.protected java.lang.String
listParam()
void
setCaption(java.lang.String caption)
Sets the caption of this prompt element.void
setDataReference(UC4ObjectName vara)
Sets a UC4 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(int value)
Deprecated.Use setMaxValue() insteadvoid
setMaxValue(java.lang.Integer value)
Sets the maximum value.void
setMinimumValue(int min)
Deprecated.Use setMinValue() insteadvoid
setMinValue(java.lang.Integer min)
Sets the minimum value.void
setQuoteCharacter(char c)
Sets the character for a quote, for example ' or ".void
setTooltip(java.lang.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, setValue, setValues, setVariable, store, storeAdditionalPromptData, storeDefaultValues, toString, updateDefaultValue, validateForExecute, validateId
-
-
-
-
Constructor Detail
-
NumberElement
public NumberElement(java.lang.String variableName, UC4ObjectName reference)
Creates a new number field.- Parameters:
variableName
- Name of the script variablereference
- Name of the reference variable
-
-
Method Detail
-
setQuoteCharacter
public void setQuoteCharacter(char c)
Sets the character for a quote, for example ' or ".- Specified by:
setQuoteCharacter
in interfacePromptInterfaces.QuoteCharacter
- Parameters:
c
- Character
-
getQuoteCharacter
public char getQuoteCharacter()
Returns the character for a quote.- Specified by:
getQuoteCharacter
in interfacePromptInterfaces.QuoteCharacter
- Returns:
- for example ' or "
-
getTagName
protected java.lang.String getTagName()
- Specified by:
getTagName
in classPromptElement
-
getTooltip
public java.lang.String getTooltip()
Returns the tooltip of this Prompt Element.- Overrides:
getTooltip
in classPromptElement
- Returns:
- Tooltip
-
setTooltip
public void setTooltip(java.lang.String tooltip)
Sets the tooltip of this Prompt Element.- Overrides:
setTooltip
in classPromptElement
- Parameters:
tooltip
- Tooltip text
-
setDataReference
public void setDataReference(UC4ObjectName vara)
Sets a UC4 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
-
setMinValue
public void setMinValue(java.lang.Integer min)
Sets the minimum value.- Specified by:
setMinValue
in interfacePromptInterfaces.Constraints<java.lang.Integer>
- Parameters:
min
- Min value ornull
to disable the lower limit.
-
getMinValue
public java.lang.Integer getMinValue()
Returns the minimum value.- Specified by:
getMinValue
in interfacePromptInterfaces.Constraints<java.lang.Integer>
- Returns:
- Min value or
null
if there is no lower limit.
-
setMinimumValue
@Deprecated public void setMinimumValue(int min)
Deprecated.Use setMinValue() insteadSets the minimum value.- Parameters:
min
- Min value or-1
to disable the lower limit.
-
getMinimumValue
@Deprecated public int getMinimumValue()
Deprecated.Use getMinValue() insteadReturns the minimum value.- Returns:
- Min value or
-1
if there is no lower limit.
-
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
-
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
-
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
-
setMaxValue
public void setMaxValue(java.lang.Integer value)
Sets the maximum value.- Specified by:
setMaxValue
in interfacePromptInterfaces.Constraints<java.lang.Integer>
- Parameters:
value
- Max value ornull
in order to disable the upper limit.
-
setMaximumValue
@Deprecated public void setMaximumValue(int value)
Deprecated.Use setMaxValue() insteadSets the maximum value.- Parameters:
value
- Max value or-1
in order to disable the upper limit.
-
getMaxValue
public java.lang.Integer getMaxValue()
Returns the maximum value.- Specified by:
getMaxValue
in interfacePromptInterfaces.Constraints<java.lang.Integer>
- Returns:
- Max value or
-1
if no limit is set.
-
getMaximumValue
@Deprecated public int getMaximumValue()
Deprecated.use getMaxValue() insteadReturns the maximum value.- Returns:
- Max value or
-1
if no limit is set.
-
listParam
protected java.lang.String listParam()
- Overrides:
listParam
in classPromptElement
-
-