Interface SettingWidgets
@NonExtendable
public interface SettingWidgets
Maps setting classes to editor widgets, from
Ui.settingWidgets(). Lookup walks the setting's class hierarchy,
so registering a widget for your custom Setting subclass is all it takes for it to show up in settings panels
(a module's settings, a panel's settings window, SettingsView).-
Method Summary
Modifier and TypeMethodDescription@Nullable WidgetBuilds the row (name and editor, aSettingRow) for a setting, or null if no widget is registered for its class or any superclass.<S extends Setting<?>>
voidMakesfactorythe editor for settings oftypeand its subclasses (unless a subclass has its own), replacing any editor registered for exactlytypebefore.
-
Method Details
-
register
Makesfactorythe editor for settings oftypeand its subclasses (unless a subclass has its own), replacing any editor registered for exactlytypebefore. The factory is called each time a settings view is built, once per setting; the editor it returns is put in aSettingRowbeside or under the setting's name.- Parameters:
stacked- true if the editor is wide and should sit below the setting name rather than beside it
-
create
Builds the row (name and editor, aSettingRow) for a setting, or null if no widget is registered for its class or any superclass. The row hides itself while the setting isn't visible.
-