/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.javafx.menu; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyBooleanProperty; import javafx.collections.ObservableList; import javafx.event.Event; import javafx.event.EventHandler; public interface MenuBase extends MenuItemBase { // /** // *

Called when the menu will be shown. // *

// */ // public static EventType ON_SHOWING = // EventTypeUtil.registerInternalEventType(Event.ANY, "ON_SHOWING"); // // /** // *

Called when the menu is shown. // *

// */ // public static EventType ON_SHOWN = // EventTypeUtil.registerInternalEventType(Event.ANY, "ON_SHOWN"); // // /** // *

Called when the menu will be hidden. // *

// */ // public static EventType ON_HIDING = // EventTypeUtil.registerInternalEventType(Event.ANY, "ON_HIDING"); // // /** // *

Called when the menu is hidden. // *

// */ // public static EventType ON_HIDDEN = // EventTypeUtil.registerInternalEventType(Event.ANY, "ON_HIDDEN"); /*************************************************************************** * * * Properties * * * **************************************************************************/ /* * Indicates whether the menu is currently visible. */ public boolean isShowing(); public ReadOnlyBooleanProperty showingProperty(); // --- On Showing public ObjectProperty> onShowingProperty(); /** * Called just prior to the menu being shown, even if the menu has * no items to show. Note however that this won't be called if the menu does * not have a valid anchor node. */ public void setOnShowing(EventHandler value); public EventHandler getOnShowing(); // -- On Shown public ObjectProperty> onShownProperty(); /** * Called just after the menu is shown. */ public void setOnShown(EventHandler value); public EventHandler getOnShown(); // --- On Hiding public ObjectProperty> onHidingProperty(); /** * Called just prior to the menu being hidden. */ public void setOnHiding(EventHandler value); public EventHandler getOnHiding(); // --- On Hidden public ObjectProperty> onHiddenProperty(); /** * Called just after the menu has been hidden. */ public void setOnHidden(EventHandler value); public EventHandler getOnHidden(); /*************************************************************************** * * * Public API * * * **************************************************************************/ public ObservableList getItemsBase(); /** * If the menu is not disabled and is not already showing, * then this will cause the menu to be shown. */ public void show(); /** * Hides the menu if it was previously showing, and any showing * submenus. If this menu is not showing, then invoking this function * has no effect. */ public void hide(); }