net.sf.genuine.organizer.internal
Class MenuBarBuilder

java.lang.Object
  extended bynet.sf.genuine.organizer.internal.MenuBarBuilder

class MenuBarBuilder
extends java.lang.Object

Builder that takes the menu bar definitions of all modules one after the other and builds a menu bar incorporating the menu and menu item definitions from all modules.

Author:
Tim Wellhausen

Constructor Summary
(package private) MenuBarBuilder()
           
 
Method Summary
(package private)  void addMenus(Module module, org.jdom.Element menuBarElement)
          Adds the definition of a module by passing both the module and its "menubar" element.
(package private)  javax.swing.JMenuBar buildMenuBar()
          Creates a new JMenuBar instance and adds all menu entries recursively.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuBarBuilder

MenuBarBuilder()
Method Detail

addMenus

void addMenus(Module module,
              org.jdom.Element menuBarElement)
        throws ConfigurationException
Adds the definition of a module by passing both the module and its "menubar" element. All menu and menu item entries contained in the given element are evaluated. For each menu item an Action instance is retrieved from the module by calling the Module's getAction method with the menu item's id.

Throws:
ConfigurationException

buildMenuBar

javax.swing.JMenuBar buildMenuBar()
                            throws ConfigurationException
Creates a new JMenuBar instance and adds all menu entries recursively.

Throws:
ConfigurationException