Package com.uc4.api
Class AbstractFormItem
java.lang.Object
com.uc4.api.AbstractFormItem
- All Implemented Interfaces:
IFormItem
- Direct Known Subclasses:
FormItemLabel
,FormItemList
,FormItemNumber
,FormItemText
Shared implementation for each concrecte form item.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractFormItem
(Element element) Constructs a generic form item from the specified XML element. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the internal ID of this field.getLabel()
Returns the label of the field.boolean
isFixed()
Returnstrue
if thisIFormItem
is fixed.boolean
isLabel()
Returnstrue
if this form item is a label.boolean
isList()
Returnstrue
if this form item is a list.boolean
Returnstrue
if thisIFormItem
is full sized.boolean
isNumber()
Returnstrue
if this form item is a number field.boolean
Returnstrue
if an input is required.boolean
isText()
Returnstrue
if this form item is a text input field.boolean
Returnstrue
if thisIFormItem
is uppercase.boolean
isValid()
Tests if the current value a valid input for this field.
-
Constructor Details
-
AbstractFormItem
Constructs a generic form item from the specified XML element.- Parameters:
element
- XML element
-
-
Method Details
-
isLabel
public boolean isLabel()Description copied from interface:IFormItem
Returnstrue
if this form item is a label. -
isText
public boolean isText()Description copied from interface:IFormItem
Returnstrue
if this form item is a text input field. A cast toFormItemText
can be done if this method returnstrue
. -
isNumber
public boolean isNumber()Description copied from interface:IFormItem
Returnstrue
if this form item is a number field. A cast toFormItemNumber
can be done if this method returnstrue
. -
isList
public boolean isList()Description copied from interface:IFormItem
Returnstrue
if this form item is a list. A cast toFormItemList
can be done if this method returnstrue
. -
getLabel
Description copied from interface:IFormItem
Returns the label of the field. -
isRequired
public boolean isRequired()Description copied from interface:IFormItem
Returnstrue
if an input is required. In this case the value cannot be an emptyString
.- Specified by:
isRequired
in interfaceIFormItem
- Returns:
- Boolean indicating if a value is required to process the form
-
isValid
public boolean isValid()Description copied from interface:IFormItem
Tests if the current value a valid input for this field. -
isFixed
public boolean isFixed()Description copied from interface:IFormItem
Returnstrue
if thisIFormItem
is fixed. E.g. parameter "F" is set in UC-Script. -
isUppercase
public boolean isUppercase()Description copied from interface:IFormItem
Returnstrue
if thisIFormItem
is uppercase.- Specified by:
isUppercase
in interfaceIFormItem
- Returns:
- Boolean indicating if this
IFormItem
is uppercase.
-
isNewLine
public boolean isNewLine()Description copied from interface:IFormItem
Returnstrue
if thisIFormItem
is full sized. -
getId
Description copied from interface:IFormItem
Returns the internal ID of this field.
-