-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
jfx16
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Currently, Node is the base object for all JavaFX components. I am totally fine with that.
However, it would be better if all public methods of Node would be part of an interface that could then be implemented by other interfaces.
By doing that, interfaces intended only for JavaFX components can be created.
This guarantee currently cannot be made for interfaces.
This is especially true in situations, where we only have access to the interface but know that it must be a node, but still have to cast.
In the current implementation, the best way to achieve this would be to manually construct such an interface every time an interface targeted only for Nodes is required.
This is a) time-consuming (Node has about ten thousand lines of code) and b) not future-release-safe (i.e. if methods from node would be removed or added).
Apart from extracting the function declaration from node, nothing else would need to be done - for all other components, node should still be the base access point for all graphical components - it could of course also be the new interface, but that is not required here.
Currently, Node is the base object for all JavaFX components. I am totally fine with that.
However, it would be better if all public methods of Node would be part of an interface that could then be implemented by other interfaces.
By doing that, interfaces intended only for JavaFX components can be created.
This guarantee currently cannot be made for interfaces.
This is especially true in situations, where we only have access to the interface but know that it must be a node, but still have to cast.
In the current implementation, the best way to achieve this would be to manually construct such an interface every time an interface targeted only for Nodes is required.
This is a) time-consuming (Node has about ten thousand lines of code) and b) not future-release-safe (i.e. if methods from node would be removed or added).
Apart from extracting the function declaration from node, nothing else would need to be done - for all other components, node should still be the base access point for all graphical components - it could of course also be the new interface, but that is not required here.