JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

expand all

Profile: desktop, common

Overview

Mixin class used to represent a control that can be toggled between selected and non-selected states. In addition, a Toggle can be assigned a ToggleGroup, which manages all assigned Toggles such that only a single Toggle within the ToggleGroup may be selected at any one time.

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicselectedBoolean

Indicates whether this Toggle is selected.

Indicates whether this Toggle is selected. This can be manipulated programmatically.

 
publictoggleGroupToggleGroup

The ToggleGroup to which this ToggleButton belongs.

The ToggleGroup to which this ToggleButton belongs. A ToggleButton can only be in one group at any one time. If the group is changed, then the button is removed from the old group prior to being added to the new group.

The typical usage scenario is:

Group {
    var toggleGroup = ToggleGroup {};
    content: [
        ToggleButton {
            text: "First"
            toggleGroup: toggleGroup
        },
        ToggleButton {
            text: "Second"
            toggleGroup: toggleGroup
        },
        ToggleButton {
            text: "Third"
            toggleGroup: toggleGroup
        }
    ]
}

 
publicvalueObject

Inherited Variables

Inherited Functions