public class FormItemNumber extends AbstractFormItem
Constructor and Description |
---|
FormItemNumber(org.w3c.dom.Element numberElement)
Constructs a new
FormItemNumber using the specified XML element. |
Modifier and Type | Method and Description |
---|---|
long |
getMaximum()
Returns the maximum value which is allowed as input.
|
int |
getMaxLength()
Returns the maximum number of allowed digits.
|
long |
getMinimum()
Returns the minimum value which is allowed as input.
|
java.lang.String |
getValue()
Returns the current value.
|
boolean |
isNumber()
Returns
true if this form item is a number field. |
boolean |
isValid()
Tests if the current value a valid input for this field.
|
void |
setValue(java.lang.String value)
Sets a new value for this field.
|
getId, getLabel, isFixed, isLabel, isList, isNewLine, isRequired, isText, isUppercase
public FormItemNumber(org.w3c.dom.Element numberElement)
FormItemNumber
using the specified XML element.numberElement
- XML elementpublic boolean isNumber()
IFormItem
true
if this form item is a number field.
A cast to FormItemNumber
can be done if this method returns true
.isNumber
in interface IFormItem
isNumber
in class AbstractFormItem
public long getMaximum()
public long getMinimum()
public int getMaxLength()
public void setValue(java.lang.String value)
IFormItem
value
- New valuepublic java.lang.String getValue()
IFormItem
public boolean isValid()
IFormItem
isValid
in interface IFormItem
isValid
in class AbstractFormItem
IFormItem
is valid.