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() { }
- csr of
-
JDK-8177633 [MenuButton] Add setOn* APIs to set event handlers for show/hide event types
-
- Resolved
-