JDK-8314593 : Add hasProperties method to MenuItem and Toggle
  • Type: CSR
  • Component: javafx
  • Sub-Component: controls
  • Priority: P4
  • Status: Draft
  • Resolution: Unresolved
  • Fix Versions: tbd
  • Submitted: 2023-08-18
  • Updated: 2024-01-09
Related Reports
CSR :  
Description
Summary
-------

Add `public boolean hasProperties()` method to `MenuItem` class and `Toggle` interface.

Problem
-------

Most JavaFX classes with properties have the hasProperties method, such as Node.hasProperties().
MenuItem class, and Toggle interface are both missing hasProperties() method.

Solution
--------

Add a missing `public boolean hasProperties()` method.

Specification
-------------

    javafx/scene/control/MenuItem.java
    +    /**
    +     * Tests if this menu item has properties.
    +     * @return {@code true} if this menu item has properties.
    +     * @since 22
    +     */
    +     public boolean hasProperties() {
    
    javafx/scene/control/Toggle.java
    +    /**
    +     * Tests if this toggle has properties.
    +     * @return {@code true} if this toggle has properties.
    +     * @since 22
    +     */
    +    boolean hasProperties();