SettingsComponent(settings: S)
A component that allows the user to edit settings and its corresponding schemes.
Subclasses MUST call loadSettings
in their constructor.
There are multiple settings S instances at any time. The settings
given in the constructor is read when the
component is created and is written to when the user saves its changes. The currently-selected scheme is loaded into
the component's inputs. When the user selects a different scheme of which to change its values, the values in the
input fields are stored in a copy of settings
. This way, the local changes are not lost when switching between
schemes, and the user can still revert all unsaved changes if desired.
S
- the type of settings to manage