public class ModalForm extends AForm
DEFAULT_TRANSLATOR, translator| Constructor and Description |
|---|
ModalForm(java.lang.String title,
java.lang.String text,
java.lang.String button1,
java.lang.String button2) |
| Modifier and Type | Method and Description |
|---|---|
static ModalFormBuilder |
builder() |
void |
deserializeResponse(java.lang.String response)
Deserialize the response of the form from a string.
|
java.lang.String |
getButton1() |
java.lang.String |
getButton1(boolean translate)
Get the text of the first button.
|
java.lang.String |
getButton2() |
java.lang.String |
getButton2(boolean translate)
Get the text of the second button.
|
int |
getClickedButton()
Get the clicked button of the form.
|
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 ModalForm(@Nonnull
java.lang.String title,
@Nonnull
java.lang.String text,
@Nonnull
java.lang.String button1,
@Nonnull
java.lang.String button2)
title - The title of the formtext - The text displayed in the formbutton1 - The text of the first buttonbutton2 - The text of the second buttonpublic static ModalFormBuilder builder()
public java.lang.String getText()
@Nonnull public java.lang.String getText(boolean translate)
translate - If the text should be translated@Nonnull public java.lang.String getButton1()
@Nonnull public java.lang.String getButton1(boolean translate)
translate - If the text should be translated@Nonnull public java.lang.String getButton2()
@Nonnull public java.lang.String getButton2(boolean translate)
translate - If the text should be translatedpublic void setClickedButton(int clickedButton)
clickedButton - The clicked buttonpublic int getClickedButton()
public java.lang.String serializeResponse()
AFormserializeResponse in class AFormpublic void deserializeResponse(java.lang.String response)
AFormdeserializeResponse in class AFormresponse - The serialized response