Skip to content

PreferencesPanels

Overview

The panels that contain preferences controls. There is one panel for every tab, and it is shown when the corresponding tab is selected.

Once the dialog is created it is never destroyed so listeners do not need to be disposed.

@author Jesse Greenberg (PhET Interactive Simulations)

Class PreferencesPanels

import { PreferencesPanels } from 'scenerystack/sim';

Constructor

new PreferencesPanels( preferencesModel : PreferencesModel, supportedTabs : PreferencesType[], selectedTabProperty : TReadOnlyProperty<PreferencesType>, preferencesTabs : PreferencesTabs, providedOptions? : PreferencesPanelsOptions )

Instance Methods

focusSelectedPanel()

Focus the selected panel. The panel should not be focusable until this is requested, so it is set to be focusable before the focus() call. When focus is removed from the panel, it should become non-focusable again. That is handled in PreferencesPanelContainer class.

isFocusableSelectedContent( node : Node ) : boolean

@param node - the potential content for the selected panel that is focusable @returns true if the provided node is the currently selected panel

Source Code

See the source for PreferencesPanels.ts in the joist repository.