RectangularRadioButtonGroup¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/sun/blob/main/js/buttons/RectangularRadioButtonGroup.ts for the most up-to-date information.
Overview¶
RectangularRadioButtonGroup is a group of rectangular radio buttons, in either horizontal or vertical orientation. See sun.ButtonsScreenView for example usage.
@author Aaron Davis (PhET Interactive Simulations) @author Chris Malley (PixelZoom, Inc.)
Class RectangularRadioButtonGroup¶
Constructor¶
new RectangularRadioButtonGroup( property : PhetioProperty<T>, items : RectangularRadioButtonGroupItem<T>[], providedOptions? : RectangularRadioButtonGroupOptions )¶
Instance Methods¶
getButtonForValue( value : T ) : RectangularRadioButton<T>¶
Find the RectangularRadioButton corresponding to a value. Note that in the scene graph, the button may be nested under other layers, so use caution for coordinate transformations. @param value @returns the corresponding button
dispose()¶
Type RectangularRadioButtonGroupItem¶
Describes one radio button
- value: T
- label?: Node
- phetioDocumentation?: string
- options?: StrictOmit<RectangularRadioButtonOptions, "tandem">
- & GroupItemOptions
Type RectangularRadioButtonGroupOptions¶
- soundPlayers?: TSoundPlayer[] | null
Sound generation for the radio buttons. null means to use the defaults. Otherwise, there must be one for each button. - labelAlign?: RectangularRadioButtonLabelAlign
Determines where the optional label appears, relative to the button - labelSpacing?: number
Spacing between the optional label and the button - touchAreaXDilation?: number
Applied to each button, or each button + optional label. This is not handled via radioButtonOptions because we may have an optional label in addition to the button. - touchAreaYDilation?: number
- mouseAreaXDilation?: number
- mouseAreaYDilation?: number
- radioButtonOptions?: StrictOmit<RectangularRadioButtonOptions, "soundPlayer" | "touchAreaXDilation" | "touchAreaYDilation" | "mouseAreaXDilation" | "mouseAreaYDilation">
- & StrictOmit<TrimmedParentOptions, "children">
Type RectangularRadioButtonLabelAlign¶
Where the optional label appears, relative to the radio button
"top" | "bottom" | "left" | "right"
Source Code¶
See the source for RectangularRadioButtonGroup.ts in the sun repository.