Class IntSetting

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

public class IntSetting extends Setting<Integer>
  • Field Details

    • min

      private final int min
    • max

      private final int max
  • Constructor Details

    • IntSetting

      public IntSetting(String name, Integer value, String description, int min, int max)
  • Method Details

    • getMin

      public int getMin()
    • getMax

      public int getMax()
    • setValue

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

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

      public NumberValueSPanel<?> 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<Integer>
      Returns:
      A UI component representing this setting, or null if not implemented by a subclass.
    • onSetValue

      public IntSetting onSetValue(Function<Integer,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<Integer>
      Parameters:
      callback - The Function to be called on value change.
      Returns:
      This Setting instance, allowing for method chaining.