public class NumberElement extends PromptElement implements PromptInterfaces.Caption, PromptInterfaces.DataReference, PromptInterfaces.Focus, PromptInterfaces.QuoteCharacter, PromptInterfaces.Locked, PromptInterfaces.Constraints<java.lang.Integer>
aliasMap, list, properties
Constructor and Description |
---|
NumberElement(java.lang.String variableName,
UC4ObjectName reference)
Creates a new number field.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCaption() |
UC4ObjectName |
getDataReference() |
int |
getMaximumValue()
Deprecated.
use getMaxValue() instead
|
java.lang.Integer |
getMaxValue()
Returns the maximum value.
|
int |
getMinimumValue()
Deprecated.
Use getMinValue() instead
|
java.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()
Returns
true if the focus is set. |
boolean |
isLocked()
Returns
true 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 is
true . |
void |
setLocked(boolean locked)
Lock or unlocks this element.
|
void |
setMaximumValue(int value)
Deprecated.
Use setMaxValue() instead
|
void |
setMaxValue(java.lang.Integer value)
Sets the maximum value.
|
void |
setMinimumValue(int min)
Deprecated.
Use setMinValue() instead
|
void |
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.
|
getCustomField, getMessageInsert, getMessageNumber, getMode, getProperty, getValue, getValues, getVariable, hasList, isAltView, setAltView, setCustomField, setValue, setValues, setVariable, store, storeAdditionalPromptData, storeDefaultValues, toString, updateDefaultValue, validateForExecute, validateId
public NumberElement(java.lang.String variableName, UC4ObjectName reference)
variableName
- Name of the script variablereference
- Name of the reference variablepublic void setQuoteCharacter(char c)
setQuoteCharacter
in interface PromptInterfaces.QuoteCharacter
c
- Characterpublic char getQuoteCharacter()
getQuoteCharacter
in interface PromptInterfaces.QuoteCharacter
protected java.lang.String getTagName()
getTagName
in class PromptElement
public java.lang.String getTooltip()
getTooltip
in class PromptElement
public void setTooltip(java.lang.String tooltip)
setTooltip
in class PromptElement
tooltip
- Tooltip textpublic void setDataReference(UC4ObjectName vara)
setDataReference
in interface PromptInterfaces.DataReference
vara
- Name of a Variable Objectpublic UC4ObjectName getDataReference()
getDataReference
in interface PromptInterfaces.DataReference
public void setMinValue(java.lang.Integer min)
setMinValue
in interface PromptInterfaces.Constraints<java.lang.Integer>
min
- Min value or null
to disable the lower limit.public java.lang.Integer getMinValue()
getMinValue
in interface PromptInterfaces.Constraints<java.lang.Integer>
null
if there is no lower limit.@Deprecated public void setMinimumValue(int min)
min
- Min value or -1
to disable the lower limit.@Deprecated public int getMinimumValue()
-1
if there is no lower limit.public java.lang.String getCaption()
getCaption
in interface PromptInterfaces.Caption
public void setCaption(java.lang.String caption)
setCaption
in interface PromptInterfaces.Caption
caption
- Captionpublic boolean isLocked()
true
if this Prompt Element is locked.
In this case a user cannot change the default value in the Prompt-Screen.isLocked
in interface PromptInterfaces.Locked
isLocked
in class PromptElement
public void setLocked(boolean locked)
setLocked
in interface PromptInterfaces.Locked
setLocked
in class PromptElement
locked
- true if locked, false if the user can change the value of the Prompt Elementpublic boolean hasFocus()
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.hasFocus
in interface PromptInterfaces.Focus
public void setFocus(boolean value)
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.setFocus
in interface PromptInterfaces.Focus
value
- true if the cursor should be set in this Prompt Element, false otherwisepublic void setMaxValue(java.lang.Integer value)
setMaxValue
in interface PromptInterfaces.Constraints<java.lang.Integer>
value
- Max value or null
in order to disable the upper limit.@Deprecated public void setMaximumValue(int value)
value
- Max value or -1
in order to disable the upper limit.public java.lang.Integer getMaxValue()
getMaxValue
in interface PromptInterfaces.Constraints<java.lang.Integer>
-1
if no limit is set.@Deprecated public int getMaximumValue()
-1
if no limit is set.protected java.lang.String listParam()
listParam
in class PromptElement