public class NumberElement extends PromptElement implements PromptInterfaces.Caption, PromptInterfaces.DataReference, PromptInterfaces.Focus, PromptInterfaces.QuoteCharacter, PromptInterfaces.Locked, PromptInterfaces.Constraints<Integer>
| Constructor and Description |
|---|
NumberElement(String variableName,
UC4ObjectName reference)
Creates a new number field.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCaption() |
UC4ObjectName |
getDataReference() |
int |
getMaximumValue()
Deprecated.
use getMaxValue() instead
|
Integer |
getMaxValue()
Returns the maximum value.
|
int |
getMinimumValue()
Deprecated.
Use getMinValue() instead
|
Integer |
getMinValue()
Returns the minimum value.
|
char |
getQuoteCharacter()
Returns the character for a quote.
|
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(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(Integer value)
Sets the maximum value.
|
void |
setMinimumValue(int min)
Deprecated.
Use setMinValue() instead
|
void |
setMinValue(Integer min)
Sets the minimum value.
|
void |
setQuoteCharacter(char c)
Sets the character for a quote, for example ' or ".
|
void |
setTooltip(String tooltip)
Sets the tooltip of this Prompt Element.
|
getCustomField, getMessageInsert, getMessageNumber, getProperty, getValue, getValues, getVariable, hasList, isAltView, setAltView, setCustomField, setValue, setValues, setVariable, toString, updateDefaultValuepublic NumberElement(String variableName, UC4ObjectName reference)
variableName - Name of the script variablereference - Name of the reference variablepublic void setQuoteCharacter(char c)
setQuoteCharacter in interface PromptInterfaces.QuoteCharacterc - Characterpublic char getQuoteCharacter()
getQuoteCharacter in interface PromptInterfaces.QuoteCharacterpublic String getTooltip()
getTooltip in class PromptElementpublic void setTooltip(String tooltip)
setTooltip in class PromptElementtooltip - Tooltip textpublic void setDataReference(UC4ObjectName vara)
setDataReference in interface PromptInterfaces.DataReferencevara - Name of a Variable Objectpublic UC4ObjectName getDataReference()
getDataReference in interface PromptInterfaces.DataReferencepublic void setMinValue(Integer min)
setMinValue in interface PromptInterfaces.Constraints<Integer>min - Min value or null to disable the lower limit.public Integer getMinValue()
getMinValue in interface PromptInterfaces.Constraints<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 String getCaption()
getCaption in interface PromptInterfaces.Captionpublic void setCaption(String caption)
setCaption in interface PromptInterfaces.Captioncaption - 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.Lockedpublic void setLocked(boolean locked)
setLocked in interface PromptInterfaces.Lockedlocked - 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.Focuspublic 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.Focusvalue - true if the cursor should be set in this Prompt Element, false otherwisepublic void setMaxValue(Integer value)
setMaxValue in interface PromptInterfaces.Constraints<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 Integer getMaxValue()
getMaxValue in interface PromptInterfaces.Constraints<Integer>-1 if no limit is set.@Deprecated public int getMaximumValue()
-1 if no limit is set.Copyright © 2021. All rights reserved.