Package org.apache.pivot.wtk
Interface MenuHandler
-
- All Known Implementing Classes:
MenuHandler.Adapter
public interface MenuHandlerMenu handler interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMenuHandler.AdapterDeprecated.Since 2.1 and Java 8 the interface itself has default implementations.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidcleanupMenuBar(Component component, MenuBar menuBar)Called when a component to which this handler is attached loses the focus.default booleanconfigureContextMenu(Component component, Menu menu, int x, int y)Called when the user right-clicks on a component to which this handler is attached.default voidconfigureMenuBar(Component component, MenuBar menuBar)Called when a component to which this handler is attached gains the focus.
-
-
-
Method Detail
-
configureMenuBar
default void configureMenuBar(Component component, MenuBar menuBar)
Called when a component to which this handler is attached gains the focus.- Parameters:
component- The component that is hosting the menu bar.menuBar- The menu bar to configure.
-
cleanupMenuBar
default void cleanupMenuBar(Component component, MenuBar menuBar)
Called when a component to which this handler is attached loses the focus.- Parameters:
component- The component that is hosting the menu bar.menuBar- The menu bar to clean up.
-
configureContextMenu
default boolean configureContextMenu(Component component, Menu menu, int x, int y)
Called when the user right-clicks on a component to which this handler is attached.- Parameters:
component- The component that is handling the menu.menu- The menu to be configured.x- The X location of the click.y- The Y location of the click.- Returns:
trueto stop propagation of context menu configuration;falseto allow it to continue (default).
-
-