Package com.j3d.gen.settings.types
Class StringSetting
- All Implemented Interfaces:
EventEmitterInterface,SettingsChild
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromString(String str) Converts a string representation back to the setting's type.onSetValue(Function<String, Void> callback) Registers a callback function to be executed whenever the setting's value is changed.panel()Returns the panel associated with this setting for display and interaction.Methods inherited from class com.j3d.gen.settings.Setting
attachListener, broadcast, deserialize, detachAll, detachListener, getDefaultValue, getDescription, getName, getValue, isAttached, serialize, setValue, setValueNoBroadcast, valueToStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.j3d.gen.settings.SettingsChild
serializedName
-
Constructor Details
-
StringSetting
-
-
Method Details
-
panel
Description copied from class:SettingReturns the panel associated with this setting for display and interaction.- Specified by:
panelin interfaceSettingsChild- Overrides:
panelin classSetting<String>- Returns:
- A UI component representing this setting, or
nullif not implemented by a subclass.
-
onSetValue
Description copied from class:SettingRegisters a callback function to be executed whenever the setting's value is changed. The callback receives the new value as an argument.- Overrides:
onSetValuein classSetting<String>- Parameters:
callback- TheFunctionto be called on value change.- Returns:
- This
Settinginstance, allowing for method chaining.
-
fromString
Description copied from class:SettingConverts a string representation back to the setting's type.- Overrides:
fromStringin classSetting<String>- Parameters:
str- The string to convert.- Returns:
- The value of type T parsed from the string.
-