net.sf.genuine.organizer.internal
Class MenuBar

java.lang.Object
  extended bynet.sf.genuine.organizer.internal.Item
      extended bynet.sf.genuine.organizer.internal.MenuItem
          extended bynet.sf.genuine.organizer.internal.Menu
              extended bynet.sf.genuine.organizer.internal.MenuBar

public class MenuBar
extends Menu

Implementation class that belongs to MenuBarBuilder. The menu bar is a menu that has special properties.

Author:
Tim Wellhausen

Constructor Summary
(package private) MenuBar()
          Empty
 
Method Summary
(package private)  void addMenuEntries(Module module, java.util.List menuEntryElements)
          Adds all menu entries from the given list of menu entry elements to this menu.
(package private)  javax.swing.JMenuBar createJMenuBar()
          Creates the JMenuBar object
(package private)  javax.swing.JMenuItem createJMenuItem()
          Returns a JMenu instance filled with JMenuItem entries corresponding to the menu / menu items defined by all modules.
protected  GenuineAction getAction()
          Returns the action instance that is referred to by this objects id by retrieving it from the module.
protected  java.lang.String getBehindOfItemId()
          This menu item may have declared to be put behind another menu item.
protected  java.lang.String getId()
          Returns the menu item's id.
protected  java.lang.String getInFrontOfItemId()
          This menu item may have declared to be put in front of another menu item.
protected  boolean isSeparatorBehind()
          Returns true if a separator should appear behind this menu item.
protected  boolean isSeparatorInFront()
          Returns true if a separator should appear in front of this menu item.
protected  boolean shouldMenuEntriesShowIcons()
          The entries of the menu bar should not show icons.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuBar

MenuBar()
Empty

Method Detail

shouldMenuEntriesShowIcons

protected boolean shouldMenuEntriesShowIcons()
The entries of the menu bar should not show icons.

Overrides:
shouldMenuEntriesShowIcons in class Menu

createJMenuBar

javax.swing.JMenuBar createJMenuBar()
                              throws ConfigurationException
Creates the JMenuBar object

Throws:
ConfigurationException

addMenuEntries

void addMenuEntries(Module module,
                    java.util.List menuEntryElements)
              throws ConfigurationException
Adds all menu entries from the given list of menu entry elements to this menu. Each entry is either another menu or a menu item.

Throws:
ConfigurationException

createJMenuItem

javax.swing.JMenuItem createJMenuItem()
                                throws ConfigurationException
Returns a JMenu instance filled with JMenuItem entries corresponding to the menu / menu items defined by all modules.

Overrides:
createJMenuItem in class MenuItem
Throws:
ConfigurationException

getId

protected java.lang.String getId()
Returns the menu item's id.


isSeparatorInFront

protected boolean isSeparatorInFront()
Returns true if a separator should appear in front of this menu item.


isSeparatorBehind

protected boolean isSeparatorBehind()
Returns true if a separator should appear behind this menu item.


getInFrontOfItemId

protected java.lang.String getInFrontOfItemId()
This menu item may have declared to be put in front of another menu item. If that is the case this method returns the id of the other menu item, otherwise null.


getBehindOfItemId

protected java.lang.String getBehindOfItemId()
This menu item may have declared to be put behind another menu item. If that is the case this method returns the id of the other menu item, otherwise null.


getAction

protected GenuineAction getAction()
                           throws ConfigurationException
Returns the action instance that is referred to by this objects id by retrieving it from the module.

Throws:
ConfigurationException