public class StepSliderFormElement extends AFormElement
CustomForm.GSON, translator| Constructor and Description |
|---|
StepSliderFormElement(java.lang.String text,
int defaultStep,
java.lang.String... steps) |
StepSliderFormElement(java.lang.String text,
java.lang.String... steps) |
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(com.google.gson.JsonElement element)
Deserialize the element from a json element.
|
int |
getDefaultStep() |
int |
getSelected() |
java.lang.String[] |
getSteps() |
java.lang.String[] |
getSteps(boolean translate)
Get the steps of the step slider.
|
com.google.gson.JsonElement |
serialize()
Serialize the element to a json element.
|
void |
setSelected(int selected)
Set the selected step of the step slider.
|
getText, getText, getTranslator, getType, setTranslatorpublic StepSliderFormElement(java.lang.String text,
java.lang.String... steps)
public StepSliderFormElement(java.lang.String text,
int defaultStep,
java.lang.String... steps)
public int getDefaultStep()
public java.lang.String[] getSteps()
public java.lang.String[] getSteps(boolean translate)
translate - If the steps should be translatedpublic int getSelected()
public void setSelected(int selected)
selected - The new selected step@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