Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8190398

[MenuButton] Add setOn* APIs to set event handlers for show/hide event types

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 10
    • Component/s: javafx
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      JDK

      Description

      Summary

      Add the APIs to set event handlers for show & hide related events for MenuButton control.

      Problem

      MenuButton does not have APIs to set event handlers for show & hide related events.

      Solution

      • There are four show & hide related events: ON_SHOWING, ON_SHOWN, ON_HIDING, ON_HIDDEN.
      • For these events, four APIs should be added as: setOnShowing(), setOnShown(), setOnHiding(), setOnHidden().
      • Similar APIs are already present for controls like ChoiceBox, ComboBox, Dialog.

      Specification

      /**
       * Called just prior to the {@code ContextMenu} being shown.
       * @return the on showing property
       * @since 10
       */
      public final ObjectProperty<EventHandler<Event>> onShowingProperty() { }
      public final void setOnShowing(EventHandler<Event> value) { }
      public final EventHandler<Event> getOnShowing() { }
      
      /**
       * Called just after the {@code ContextMenu} is shown.
       * @return the on shown property
       * @since 10
       */
      public final ObjectProperty<EventHandler<Event>> onShownProperty() { }
      public final void setOnShown(EventHandler<Event> value) { }
      public final EventHandler<Event> getOnShown() { }
      
      /**
       * Called just prior to the {@code ContextMenu} being hidden.
       * @return the on hiding property
       * @since 10
       */
      public final ObjectProperty<EventHandler<Event>> onHidingProperty() { }
      public final void setOnHiding(EventHandler<Event> value) { }
      public final EventHandler<Event> getOnHiding() { }
      
      /**
       * Called just after the {@code ContextMenu} has been hidden.
       * @return the on hidden property
       * @since 10
       */
      public final ObjectProperty<EventHandler<Event>> onHiddenProperty() { }
      public final void setOnHidden(EventHandler<Event> value) { }
      public final EventHandler<Event> getOnHidden() { }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arapte Ambarish Rapte
                Reporter:
                arapte Ambarish Rapte
                Reviewed By:
                Kevin Rushforth, Philip Race
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: