Interface SettingsStore


public interface SettingsStore
Holds the value of every Settings record, loaded at startup from the config directory. A singleton.

Setting a record's property to a different value saves the record, on a virtual thread named settings. Settings are observable like any property: a view follows them with ui.bind(editor::setFont, settings.map(s -> font(s.fontSize()))).

  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Record>
    Property<T>
    get(Class<T> type)
    Returns the property of a settings record: the same property on every call for a type.
  • Method Details

    • get

      <T extends Record> Property<T> get(Class<T> type)
      Returns the property of a settings record: the same property on every call for a type.
      Type Parameters:
      T - the settings record
      Parameters:
      type - the settings record
      Returns:
      its property
      Throws:
      NullPointerException - if type is null
      IllegalArgumentException - if the type has no settings descriptor
      IllegalStateException - if the settings are not loaded yet, such as from a startup step that runs before theirs