PropertyToggleButton

class PropertyToggleButton<V, P : Property<V?>>(val property: P, val value: V, text: String, graphic: Node? = null) : SelectButtonBase

Behaves like a ToggleButton, but instead of a ToggleGroup it has a Property backing which button is selected.

Generic Types :

  • V is a simple data type, such as String, or String?.

  • P is a Property whose value is of type V, such as StringProperty or OptionalStringProperty.

When a selected PropertyToggleButton is pressed, the property is set to null no items are selected.

In contrast, clicking a selected PropertyRadioButton, the property's value remains unchanged, and the button remains selected.

Constructors

Link copied to clipboard
constructor(property: P, value: V, text: String, graphic: Node? = null)

Properties

Link copied to clipboard
val property: P
Link copied to clipboard
open override var selected: Boolean
Link copied to clipboard
Link copied to clipboard
val value: V

This button is selected when property.value == value