RFR: 8313650: Add hasProperties method to MenuItem and Toggle

John Hendrikx jhendrikx at openjdk.org
Fri Aug 18 22:23:31 UTC 2023


On Fri, 18 Aug 2023 17:06:57 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> Adding new 
> `boolean hasProperties()`
>  method to MenuItem and Toggle only.
> 
> This change requires CSR.

On second thought, I don't think you should add `hasProperties` to the `Toggle` interface.  Adding it to `MenuItem` should be enough to make it publically available for `RadioMenuItem`.  `ToggleButton` (which also implements `Toggle`) already inherits this method from `Node`.

This will also make it easier to retain compatibility, as otherwise you'd have to make `hasProperties` a default method in `Toggle` IMHO.

edit: If you want the `hasProperties` method to be available through an interface, then I think a new interface should be defined that is implemented by `Node` and `MenuItem` both (which should probably contain the other property related methods as well then)

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1215#issuecomment-1684488408


More information about the openjfx-dev mailing list