public class CustomFormBuilder
extends java.lang.Object
| Constructor and Description |
|---|
CustomFormBuilder() |
| Modifier and Type | Method and Description |
|---|---|
CustomForm |
build()
Build the custom form.
|
CustomFormBuilder |
checkbox(java.lang.String text)
Add a checkbox to the form.
|
CustomFormBuilder |
checkbox(java.lang.String text,
boolean defaultValue)
Add a checkbox with a default value to the form.
|
CustomFormBuilder |
dropdown(java.lang.String text,
int defaultOption,
java.lang.String... options)
Add a dropdown with a default option to the form.
|
CustomFormBuilder |
dropdown(java.lang.String text,
java.lang.String... options)
Add a dropdown to the form.
|
CustomFormBuilder |
label(java.lang.String text)
Add a label to the form.
|
CustomFormBuilder |
slider(java.lang.String text,
float min,
float max,
float step)
Add a slider to the form.
|
CustomFormBuilder |
slider(java.lang.String text,
float min,
float max,
float step,
float defaultValue)
Add a slider with a default value to the form.
|
CustomFormBuilder |
stepSlider(java.lang.String text,
int defaultStep,
java.lang.String... steps)
Add a step slider with a default step to the form.
|
CustomFormBuilder |
stepSlider(java.lang.String text,
java.lang.String... steps)
Add a step slider to the form.
|
CustomFormBuilder |
textField(java.lang.String text,
java.lang.String placeholder)
Add a text field to the form.
|
CustomFormBuilder |
textField(java.lang.String text,
java.lang.String placeholder,
java.lang.String defaultValue)
Add a text field with a default value to the form.
|
CustomFormBuilder |
title(java.lang.String title)
Set the title of the form.
|
public CustomFormBuilder title(java.lang.String title)
title - The titlepublic CustomFormBuilder checkbox(@Nonnull java.lang.String text)
text - The text of the checkboxpublic CustomFormBuilder checkbox(@Nonnull java.lang.String text, boolean defaultValue)
text - The text of the checkboxdefaultValue - The default value of the checkboxpublic CustomFormBuilder dropdown(@Nonnull java.lang.String text, java.lang.String... options)
text - The text of the dropdownoptions - The options of the dropdownpublic CustomFormBuilder dropdown(@Nonnull java.lang.String text, int defaultOption, java.lang.String... options)
text - The text of the dropdowndefaultOption - The default option of the dropdownoptions - The options of the dropdownpublic CustomFormBuilder label(@Nonnull java.lang.String text)
text - The text of the labelpublic CustomFormBuilder slider(@Nonnull java.lang.String text, float min, float max, float step)
text - The text of the slidermin - The minimum value of the slidermax - The maximum value of the sliderstep - The step value of the sliderpublic CustomFormBuilder slider(@Nonnull java.lang.String text, float min, float max, float step, float defaultValue)
text - The text of the slidermin - The minimum value of the slidermax - The maximum value of the sliderstep - The step value of the sliderdefaultValue - The default value of the sliderpublic CustomFormBuilder stepSlider(@Nonnull java.lang.String text, java.lang.String... steps)
text - The text of the step slidersteps - The steps of the step sliderpublic CustomFormBuilder stepSlider(@Nonnull java.lang.String text, int defaultStep, java.lang.String... steps)
text - The text of the step sliderdefaultStep - The default step of the step slidersteps - The steps of the step sliderpublic CustomFormBuilder textField(@Nonnull java.lang.String text, @Nonnull java.lang.String placeholder)
text - The text of the text fieldplaceholder - The placeholder of the text fieldpublic CustomFormBuilder textField(@Nonnull java.lang.String text, @Nonnull java.lang.String placeholder, @Nonnull java.lang.String defaultValue)
text - The text of the text fieldplaceholder - The placeholder of the text fielddefaultValue - The default value of the text fieldpublic CustomForm build()