class MenuBase
{
    private JMenu menu = null;

    final void setMenu(JMenu menu)
    {
        this.menu = menu;
    }
    
    /**
     * Provide the JMenu instance of the ZoomMenu.
     *
     * @return JMenu instance.
     */
    public JMenu getMenu()
    {
        return this.menu;
    }

    /**
     * Set if the menu should be enabled or disabled.
     *
     * @param isEnable boolean instance.
     */
    public void setEnableMenu(boolean isEnable)
    {
        menu.setEnabled(isEnable);
    }

    /**
     * Add the ActionListener for the menu items.
     *
     * @param listener ActionListener.
     */
    public void addMenuListeners(ActionListener listener)
    {<FILL_FUNCTION_BODY>}

    private void removeActionListeners(JMenuItem menuItem)
    {
        for (ActionListener listener : menuItem.getActionListeners())
        {
            menuItem.removeActionListener(listener);
        }
    }

}

        for (Component comp : menu.getMenuComponents())
        {
            JMenuItem menuItem = (JMenuItem) comp;
            removeActionListeners(menuItem);
            menuItem.addActionListener(listener);
        }
    
<no_super_class>