public class NumberElement extends PromptElement
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.
|
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. |
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, getProperty, getValue, getValues, getVariable, hasList, setCustomField, setValue, setValues, setVariable, toString, updateDefaultValue
public NumberElement(java.lang.String variableName, UC4ObjectName reference)
variableName
- Name of the script variablereference
- Name of the reference variablepublic void setQuoteCharacter(char c)
c
- Characterpublic char getQuoteCharacter()
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)
vara
- Name of a Variable Objectpublic UC4ObjectName getDataReference()
public void setMinValue(java.lang.Integer min)
min
- Min value or null
to disable the lower limit.public java.lang.Integer getMinValue()
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()
public void setCaption(java.lang.String 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.public void setLocked(boolean locked)
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.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.value
- true if the cursor should be set in this Prompt Element, false otherwisepublic void setMaxValue(java.lang.Integer value)
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()
-1
if no limit is set.@Deprecated public int getMaximumValue()
-1
if no limit is set.