Class DoubleSetting

java.lang.Object
com.j3d.gen.settings.Setting<Double>
com.j3d.gen.settings.types.DoubleSetting
All Implemented Interfaces:
EventEmitterInterface, SettingsChild

public class DoubleSetting extends Setting<Double>
  • Field Details

  • Constructor Details

    • DoubleSetting

      public DoubleSetting(String name, Double value, String description, double min, double max)
  • Method Details

    • setValues

      public DoubleSetting setValues(Function<Double,Integer> toInt, Function<Integer,Double> toDouble, double stepSize)
    • fromString

      public Double fromString(String str)
      Description copied from class: Setting
      Converts a string representation back to the setting's type.
      Overrides:
      fromString in class Setting<Double>
      Parameters:
      str - The string to convert.
      Returns:
      The value of type T parsed from the string.
    • getMin

      public double getMin()
    • getMax

      public double getMax()
    • setValue

      public void setValue(Double value)
      Description copied from class: Setting
      Sets the value of this setting and broadcasts an update event.
      Overrides:
      setValue in class Setting<Double>
      Parameters:
      value - The new value to set.
    • panel

      public NumberValueSPanel<Double> panel()
      Description copied from class: Setting
      Returns the panel associated with this setting for display and interaction.
      Specified by:
      panel in interface SettingsChild
      Overrides:
      panel in class Setting<Double>
      Returns:
      A UI component representing this setting, or null if not implemented by a subclass.
    • onSetValue

      public DoubleSetting onSetValue(Function<Double,Void> callback)
      Description copied from class: Setting
      Registers a callback function to be executed whenever the setting's value is changed. The callback receives the new value as an argument.
      Overrides:
      onSetValue in class Setting<Double>
      Parameters:
      callback - The Function to be called on value change.
      Returns:
      This Setting instance, allowing for method chaining.