java - Bind ToggleGroup bidirectionally in javafx -
- Get link
- X
- Other Apps
Imagine having a mouse-mode an enum to define
after I need to field field Can do this with 2 listeners, but I wonder if there is a way to make custom bidirectional maps. I do not think there is a way to do this directly. While a general purpose can make a good addition to the API, even in this case, because the inverseMapping of the function The use of some listeners in this case is the way to go. The closest thing to "custom bidirectional map" is that method. S & gt; Where a (writeable) MouseMode currentMode to be bidirectionally linked to toggle group. Whenever a toggle is set, the currentMode is switched accordingly, but it also converts some external process to CurrentMode (maybe press a key) then the togglegroup optimizes accordingly.
Bindings.bindBidirectional (asset
ToggleGroup 's
selectedProperty is read only (since each
toggle ' s
set select (...) The law applies, as well as
ToggleGroup
selectedP Roperty ).
Bindings.bindBiDirectional (StringProperty stringProperty, ObjectProperty & lt; t & gt; otherProperty, StringConverter & lt; t & Gt; converter)
Comments
Post a Comment