java.lang.Object
no.ntnu.principes.util.ConfigValueBinder
Binds JavaFX properties to configuration values stored in a repository.
Enables automatic UI updates when configuration values change.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindBoolean(String key, boolean defaultValue, javafx.beans.property.BooleanProperty property) Binds a boolean property to a configuration value.voidbindInteger(String key, int defaultValue, javafx.beans.property.IntegerProperty property) Binds an integer property to a configuration value.voidbindString(String key, String defaultValue, javafx.beans.property.StringProperty property) Binds a string property to a configuration value.
-
Constructor Details
-
ConfigValueBinder
public ConfigValueBinder()
-
-
Method Details
-
bindString
public void bindString(String key, String defaultValue, javafx.beans.property.StringProperty property) Binds a string property to a configuration value.- Parameters:
key- The configuration key to bind todefaultValue- The fallback value if the configuration is missingproperty- The string property to bind
-
bindBoolean
public void bindBoolean(String key, boolean defaultValue, javafx.beans.property.BooleanProperty property) Binds a boolean property to a configuration value.- Parameters:
key- The configuration key to bind todefaultValue- The fallback value if the configuration is missingproperty- The boolean property to bind
-
bindInteger
public void bindInteger(String key, int defaultValue, javafx.beans.property.IntegerProperty property) Binds an integer property to a configuration value.- Parameters:
key- The configuration key to bind todefaultValue- The fallback value if the configuration is missingproperty- The integer property to bind
-