Package org.apache.pivot.wtk
Interface MenuHandler
-
- All Known Implementing Classes:
MenuHandler.Adapter
public interface MenuHandler
Menu handler interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
MenuHandler.Adapter
Deprecated.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 void
cleanupMenuBar(Component component, MenuBar menuBar)
Called when a component to which this handler is attached loses the focus.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.default void
configureMenuBar(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:
true
to stop propagation of context menu configuration;false
to allow it to continue (default).
-
-