Class SliderOption
- All Implemented Interfaces:
Serializable<Double>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal doubleThe maximum value this slider can be set tofinal doubleThe minimum value this slider can be set tofinal doubleThe increment by which this slider's value changesFields inherited from class Option
description, name, owner -
Constructor Summary
ConstructorsConstructorDescriptionSliderOption(BaseModule owner, String name, String description, double value, double min, double max, double step) Creates a new slider optionSliderOption(BaseModule owner, String name, String description, double value, double min, double max, double step, Option<?> parent) Creates a new slider option with a parentSliderOption(BaseModule owner, String name, String description, double value, double min, double max, double step, BooleanSupplier visibility) Creates a new slider option with visibilitySliderOption(BaseModule owner, String name, String description, double value, double min, double max, double step, BooleanSupplier visibility, Option<?> parent) Creates a new slider option with visibility and parent -
Method Summary
Methods inherited from class Option
getFullName, getParent, isParent, isVisible, setParent, setVisibility
-
Field Details
-
min
public final double minThe minimum value this slider can be set to -
max
public final double maxThe maximum value this slider can be set to -
step
public final double stepThe increment by which this slider's value changes
-
-
Constructor Details
-
SliderOption
public SliderOption(BaseModule owner, String name, String description, double value, double min, double max, double step) Creates a new slider option- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this optionvalue- The initial valuemin- The minimum allowed valuemax- The maximum allowed valuestep- The increment between values
-
SliderOption
public SliderOption(BaseModule owner, String name, String description, double value, double min, double max, double step, Option<?> parent) Creates a new slider option with a parent- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this optionvalue- The initial valuemin- The minimum allowed valuemax- The maximum allowed valuestep- The increment between valuesparent- The parent option, or null if this is a root option
-
SliderOption
public SliderOption(BaseModule owner, String name, String description, double value, double min, double max, double step, BooleanSupplier visibility) Creates a new slider option with visibility- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this optionvalue- The initial valuemin- The minimum allowed valuemax- The maximum allowed valuestep- The increment between valuesvisibility- The visibility supplier for this option
-
SliderOption
public SliderOption(BaseModule owner, String name, String description, double value, double min, double max, double step, BooleanSupplier visibility, Option<?> parent) Creates a new slider option with visibility and parent- Parameters:
owner- The module that owns this optionname- The name of this optiondescription- The description of this optionvalue- The initial valuemin- The minimum allowed valuemax- The maximum allowed valuestep- The increment between valuesvisibility- The visibility supplier for this optionparent- The parent option, or null if this is a root option
-
-
Method Details
-
getValue
-
setValue
-
reset
-
toJson
public com.google.gson.JsonObject toJson()- Returns:
- The object as a JsonObject
-
fromJson
- Parameters:
object- The JsonObject to deserialize- Returns:
- The deserialized object
-