public class ActionForm extends Form
DEFAULT_TRANSLATOR, translator| Constructor and Description |
|---|
ActionForm(java.lang.String title,
java.lang.String text,
FormElement... elements) |
| Modifier and Type | Method and Description |
|---|---|
static ActionFormBuilder |
builder() |
void |
deserializeResponse(java.lang.String response)
Deserialize the response of the form from a string.
|
int |
getClickedButton()
Get the clicked button of the form.
|
FormElement[] |
getElements() |
java.lang.String |
getText() |
java.lang.String |
getText(boolean translate)
Get the text of the form.
|
java.lang.String |
serializeResponse()
Serialize the response of the form to a string.
|
void |
setClickedButton(int clickedButton)
Set the clicked button of the form.
|
getTitle, getTitle, getTranslator, getType, setTranslatorpublic ActionForm(@Nonnull
java.lang.String title,
@Nonnull
java.lang.String text,
@Nonnull
FormElement... elements)
title - The title of the formtext - The text displayed in the formelements - The elements of the formpublic static ActionFormBuilder builder()
public java.lang.String getText()
@Nonnull public java.lang.String getText(boolean translate)
translate - If the text should be translated@Nonnull public FormElement[] getElements()
public void setClickedButton(int clickedButton)
clickedButton - The clicked buttonpublic int getClickedButton()
public java.lang.String serializeResponse()
FormserializeResponse in class Formpublic void deserializeResponse(java.lang.String response)
deserializeResponse in class Formresponse - The serialized responsejava.lang.NumberFormatException - If the response is not a number