I have a problem similar to the one raised in Deselect an item on an javafx ListView on click. In James_D's solution and excellent (as usual) explanation he raises the possibility that the solution may not work in the future if the restricted API underlying the solution in the link changes.
The API in question is com.sun.javafx.scene.control.behavior.CellBehaviorBase
, which seems to be the entry point into the selection models from user mouse input. James_D relies on that API without referencing it directly (by way of an event filter). The solution should thus be considered as perfectly 'legal'.
Based on my understanding of the 'language contract' a developer should be able to rely on that API remaining stable or at least not change in a way the renders the solution in the link ineffective.
Is this understanding correct?