PreferencesModel¶
Overview¶
A Class that manages Simulation features that are enabled and disabled by user Preferences.
@author Jesse Greenberg
Class PreferencesModel¶
Constructor¶
new PreferencesModel( providedOptions : PreferencesModelOptions )¶
Instance Methods¶
preferenceModelHasCustom( preferenceModel : Required<CustomPreferencesOptions> ) : boolean¶
supportsSimulationPreferences() : boolean¶
Returns true if the SimulationModel supports any preferences that can be changed.
supportsVisualPreferences() : boolean¶
Returns true if the VisualModel has any preferences that can be changed.
supportsAudioPreferences() : boolean¶
Returns true if the AudioModel has any preferences that can be changed.
supportsInputPreferences() : boolean¶
Returns true if the InputModel has any preferences that can be changed.
supportsLocalizationPreferences() : boolean¶
Returns true if the LocalizationModel has any preferences that can be changed.
shouldShowDialog() : boolean¶
Returns true if this model supports any controllable preferences for the dialog. Returns false when the dialog would have nothing to display.
Instance Properties¶
simulationModel : SimulationModel¶
(readonly)
visualModel : VisualModel¶
(readonly)
audioModel : AudioModel¶
(readonly)
inputModel : InputModel¶
(readonly)
localizationModel : LocalizationModel¶
(readonly)
Static Properties¶
PreferencesModelIO : IOType¶
Type AudioModel¶
Model for controls that appear in the "Audio" panel of preferences
Required<AudioPreferencesOptions>
Type InputModel¶
Required<InputPreferencesOptions>
Type LocalizationModel¶
Required<LocalizationPreferencesOptions>
Type PreferencesModelOptions¶
- simulationOptions?: SimulationPreferencesOptions
configuration for controls in the "Simulation" tab of the PreferencesDialog - visualOptions?: VisualPreferencesOptions
configuration for controls in the "Visual" tab of the PreferencesDialog - audioOptions?: AudioPreferencesOptions
configuration for controls in the "Audio" tab of the PreferencesDialog - inputOptions?: InputPreferencesOptions
configuration for controls in the "Input" tab of the PreferencesDialog - localizationOptions?: LocalizationPreferencesOptions
configuration for controls in the "Localization" tab of the PreferencesDialog - & PhetioObjectOptions
Type SimulationModel¶
Model for controls that appear in the "Simulation" panel of preferences
- tandemName: string
- & Required<SimulationPreferencesOptions>
Type VisualModel¶
Model for controls that appear in the "Visual" panel of preferences
Required<VisualPreferencesOptions>
Source Code¶
See the source for PreferencesModel.ts in the joist repository.