Package org.eclipse.swt.events

# Interface MenuListener

All Superinterfaces:
  `EventListener`, `SWTEventListener`

All Known Implementing Classes:
  `MenuAdapter`

public interface MenuListener extends SWTEventListener
Classes which implement this interface provide methods that deal with the hiding and showing of menus.

After creating an instance of a class that implements this interface it can be added to a menu using the `addMenuListener` method and removed using the `removeMenuListener` method. When the menu is hidden or shown, the appropriate method will be invoked.

See Also:
  - `MenuAdapter`
  - `MenuEvent`

## Method Summary

Modifier and Type
Method
Description
`void`
`menuHidden(MenuEvent e)`
Sent when a menu is hidden.
`static MenuListener`
`menuHiddenAdapter(Consumer<MenuEvent> c)`
Static helper method to create a `MenuListener` for the `menuHidden(MenuEvent e)`) method, given a lambda expression or a method reference.
`void`
`menuShown(MenuEvent e)`
Sent when a menu is shown.
`static MenuListener`
`menuShownAdapter(Consumer<MenuEvent> c)`
Static helper method to create a `MenuListener` for the `menuShown(MenuEvent e)`) method, given a lambda expression or a method reference.

## Method Details

### menuHidden

void menuHidden(MenuEvent e)
Sent when a menu is hidden.

Parameters:
  `e` - an event containing information about the menu operation

### menuShown

void menuShown(MenuEvent e)
Sent when a menu is shown.

Parameters:
  `e` - an event containing information about the menu operation

### menuHiddenAdapter

static MenuListener menuHiddenAdapter(Consumer<MenuEvent> c)
Static helper method to create a `MenuListener` for the `menuHidden(MenuEvent e)`) method, given a lambda expression or a method reference.

Parameters:
  `c` - the consumer of the event
Returns:
  MenuListener
Since:
  3.107

### menuShownAdapter

static MenuListener menuShownAdapter(Consumer<MenuEvent> c)
Static helper method to create a `MenuListener` for the `menuShown(MenuEvent e)`) method, given a lambda expression or a method reference.

Parameters:
  `c` - the consumer of the event
Returns:
  MenuListener
Since:
  3.107