Returns the MainMenu object that contains this menu.
public MainMenu getMainMenu()
Returns a MainMenu object if this menu is contained by a main menu; otherwise, returns null.
The main menu is the menu at the top of this menu's parent chain.
This method returns null if this menu is not the child of another, or if this menu is contained in a context menu.