Class ConfigValueBinder

java.lang.Object
no.ntnu.principes.util.ConfigValueBinder

public class ConfigValueBinder extends Object
Binds JavaFX properties to configuration values stored in a repository. Enables automatic UI updates when configuration values change.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bindBoolean(String key, boolean defaultValue, javafx.beans.property.BooleanProperty property)
    Binds a boolean property to a configuration value.
    void
    bindInteger(String key, int defaultValue, javafx.beans.property.IntegerProperty property)
    Binds an integer property to a configuration value.
    void
    bindString(String key, String defaultValue, javafx.beans.property.StringProperty property)
    Binds a string property to a configuration value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 to
      defaultValue - The fallback value if the configuration is missing
      property - 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 to
      defaultValue - The fallback value if the configuration is missing
      property - 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 to
      defaultValue - The fallback value if the configuration is missing
      property - The integer property to bind