public class CheckboxFormElement extends AFormElement
CustomForm.GSON, translator| Constructor and Description |
|---|
CheckboxFormElement(java.lang.String text) |
CheckboxFormElement(java.lang.String text,
boolean defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(com.google.gson.JsonElement element)
Deserialize the element from a json element.
|
boolean |
getDefaultValue() |
boolean |
isChecked() |
com.google.gson.JsonElement |
serialize()
Serialize the element to a json element.
|
void |
setChecked(boolean checked)
Set the current value of the checkbox.
|
getText, getText, getTranslator, getType, setTranslatorpublic CheckboxFormElement(java.lang.String text)
public CheckboxFormElement(java.lang.String text,
boolean defaultValue)
public boolean getDefaultValue()
public boolean isChecked()
public void setChecked(boolean checked)
checked - The new value@Nullable public com.google.gson.JsonElement serialize()
AFormElementserialize in class AFormElementpublic void deserialize(com.google.gson.JsonElement element)
throws com.google.gson.JsonParseException
AFormElementdeserialize in class AFormElementelement - The serialized elementcom.google.gson.JsonParseException - If the element is not valid