public abstract static class FormField.Builder<F extends FormField,B extends FormField.Builder<?,?>>
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Builder(FormField formField) |
protected |
Builder(java.lang.String fieldName,
FormField.Type type) |
| Modifier and Type | Method and Description |
|---|---|
B |
addFormFieldChildElement(FormFieldChildElement newFormFieldChildElement) |
B |
addFormFieldChildElements(java.util.Collection<? extends FormFieldChildElement> formFieldChildElements) |
abstract F |
build() |
abstract B |
getThis() |
FormField.Type |
getType() |
B |
reset() |
protected abstract void |
resetInternal() |
B |
setDescription(java.lang.String description)
Sets a description that provides extra clarification about the question.
|
B |
setLabel(java.lang.String label)
Sets the label of the question which should give enough information to the user to
fill out the form.
|
B |
setRequired()
Sets if the question must be answered in order to complete the questionnaire.
|
B |
setRequired(boolean required)
Sets if the question must be answered in order to complete the questionnaire.
|
protected Builder(java.lang.String fieldName,
FormField.Type type)
protected Builder(FormField formField)
public B setDescription(java.lang.String description)
If the question is of type FIXED then the description should remain empty.
description - provides extra clarification about the question.public B setLabel(java.lang.String label)
label - the label of the question.public B setRequired()
public B setRequired(boolean required)
required - if the question must be answered in order to complete the questionnaire.public B addFormFieldChildElements(java.util.Collection<? extends FormFieldChildElement> formFieldChildElements)
public B addFormFieldChildElement(FormFieldChildElement newFormFieldChildElement)
protected abstract void resetInternal()
public B reset()
public abstract F build()
public FormField.Type getType()
public abstract B getThis()