Basics
Guides
API Reference
Basics
Guides
API Reference
[12:7] extends: FxObj
Wraps JavaFX ToggleGroup, which ensures that at most one ToggleButton or RadioButton in the group is selected at any time. When the user selects a new button, the previously selected button is automatically deselected. This class provides methods to retrieve the text of the currently selected toggle and to register a callback that fires whenever the selection changes.
ToggleGroup ()
Initializes a new ToggleGroup instance.
this objectgetSelected ()
Retrieves the text of the currently selected ToggleButton in the group.
string The text of the selected ToggleButton, or an empty string if none is selected.onChange (callback OnChange)
Sets a callback function to execute when the selected ToggleButton changes.
OnChange The callback function for handling selection change events.this object for chaininggetToggles ()
Returns the live ObservableList of toggles in this group.
An AJO around an ObservableListselectToggle (object Toggle)
Selects the given Toggle in the group, deselecting any previously selected toggle.
Toggle is a wrapper whose .obj holds a javafx.scene.control.Toggle.this object for chaininggetSelectedToggle ()
Returns the currently selected Toggle, or null when none is selected.
An AJO around javafx.scene.control.Toggle, or null.selectedToggleProperty ()
Returns the read-only property backing the selected toggle.
A ReadOnlyObjectPropertygetProperties ()
Returns the observable property map associated with this toggle group. The map is created on first access.
An AJO around an ObservableMap<Object,Object>.hasProperties ()
Returns whether any user properties have been attached to this group.
A bool; true when the properties map is non-empty.setUserData (UserData)
Attaches an arbitrary user data value to this toggle group.
UserData is the value to store, or null to clear.this object for chaininggetUserData ()
Returns the user data value previously attached to this toggle group.
The stored value, unwrapped to its Aussom type when possible.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.