Closed Mazi-S closed 4 months ago
Currently there are 3 ways of binding the radio button.
ButtonGroup
through withButtonGroup(..)
Your proposal is a nice type agnostic extension of approach 2. which is currently
only possible using isSelectedIf(..)
methods. But there is no direct way of achieving
this like the method UI.radioButton(String text, T value, Var<T> current)
in your proposal.
I like the suggestion a lot and will add support for it.
Currently it is a bit difficult to create a set of radio buttons and link them together. (Or am I missing something?)
Wouldn't it be nice to have a nice API in
SwingTree
to make this easier?The provided value could be set to the property when the button is selected. On the other hand, the button could be deselected/selected when the property is updated.