FileDocCategorySizeDatePackage
MenuManagerImpl.javaAPI DocAzureus 3.0.3.42151Tue Mar 06 13:59:00 GMT 2007org.gudy.azureus2.pluginsimpl.local.ui.menus

MenuManagerImpl

public class MenuManagerImpl extends Object implements MenuManager
author
Allan Crooks

Fields Summary
Constructors Summary
public MenuManagerImpl(org.gudy.azureus2.pluginsimpl.local.ui.UIManagerImpl ui_manager)

Methods Summary
public MenuItemaddMenuItem(java.lang.String menuID, java.lang.String resource_key)

    	MenuItemImpl item = new MenuItemImpl(menuID, resource_key);
    	UIManagerImpl.fireEvent(UIManagerEvent.ET_ADD_MENU_ITEM, item);
    	return item;
    
public MenuItemaddMenuItem(MenuItem parent, java.lang.String resource_key)


		if (!(parent instanceof MenuItemImpl)) {
			throw new UIRuntimeException("parent must have been created by addMenuItem");
		}
		
		if (parent.getStyle() != MenuItemImpl.STYLE_MENU) {
			throw new UIRuntimeException("parent menu item must have the menu style associated");
		}
		
		MenuItemImpl item = new MenuItemImpl((MenuItemImpl)parent, resource_key);
		UIManagerImpl.fireEvent( UIManagerEvent.ET_ADD_SUBMENU_ITEM, new Object[] {item, parent});
		return item;