public class SliderFormElement extends FormElement implements ModifiableFormElement
CustomForm.GSON, translator| Constructor and Description |
|---|
SliderFormElement(java.lang.String text,
float min,
float max,
float step) |
SliderFormElement(java.lang.String text,
float min,
float max,
float step,
float defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(com.google.gson.JsonElement element)
Deserialize the element from a json element.
|
float |
getCurrent() |
float |
getDefaultValue() |
float |
getMax() |
float |
getMin() |
float |
getStep() |
com.google.gson.JsonElement |
serialize()
Serialize the element to a json element.
|
void |
setCurrent(float current)
Set the current value of the slider.
|
getText, getText, getTranslator, getType, setTranslatorpublic SliderFormElement(java.lang.String text,
float min,
float max,
float step)
public SliderFormElement(java.lang.String text,
float min,
float max,
float step,
float defaultValue)
public float getMin()
public float getMax()
public float getStep()
public float getDefaultValue()
public float getCurrent()
public void setCurrent(float current)
current - The new value@Nullable public com.google.gson.JsonElement serialize()
ModifiableFormElementserialize in interface ModifiableFormElementpublic void deserialize(com.google.gson.JsonElement element)
throws com.google.gson.JsonParseException
ModifiableFormElementdeserialize in interface ModifiableFormElementelement - The serialized elementcom.google.gson.JsonParseException - If the element is not valid