org.formaria.awt
Class MenuBar

java.lang.Object
  extended by java.awt.MenuComponent
      extended by java.awt.MenuBar
          extended by org.formaria.awt.MenuBar
All Implemented Interfaces:
java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, Appender

public class MenuBar
extends java.awt.MenuBar
implements Appender

A wrapper for menus

Copyright: Copyright (c) Formaria Ltd., 2008

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.MenuBar
java.awt.MenuBar.AccessibleAWTMenuBar
 
Nested classes/interfaces inherited from class java.awt.MenuComponent
java.awt.MenuComponent.AccessibleAWTMenuComponent
 
Constructor Summary
MenuBar()
          Create a new menu bar
 
Method Summary
 void addSeparator()
          Implemented from the Appender interface.
 void append(java.lang.Object o, java.lang.String name)
          Appends the object o to this item
 java.lang.Object getObject(java.lang.Object menu, java.lang.String name)
          Get a child object by name
 java.lang.Object getObject(java.lang.String name)
          Get a child object by name
 void setAction(java.lang.Object action)
          Set an Action for the menu bar - does nothing
 void setup()
          Do any final setup of the menu needed.
 
Methods inherited from class java.awt.MenuBar
add, addNotify, countMenus, deleteShortcut, getAccessibleContext, getHelpMenu, getMenu, getMenuCount, getShortcutMenuItem, remove, remove, removeNotify, setHelpMenu, shortcuts
 
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, paramString, postEvent, processEvent, setFont, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.formaria.aria.Appender
setName
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

MenuBar

public MenuBar()
Create a new menu bar

Method Detail

setAction

public void setAction(java.lang.Object action)
Set an Action for the menu bar - does nothing

Specified by:
setAction in interface Appender
Parameters:
action - the action object

setup

public void setup()
Do any final setup of the menu needed. If there is an existing menu bar in the application the menus of this menu bar are attached to the existing menu bar, unless the menu bar name matches that of the exitsing menu bar, in which case the old menu bar is replaced by this one. The menu bar is normally named by the name of the page within which it was declared.

Specified by:
setup in interface Appender

append

public void append(java.lang.Object o,
                   java.lang.String name)
Appends the object o to this item

Specified by:
append in interface Appender
Parameters:
o - the appended item
name - the caption

addSeparator

public void addSeparator()
Implemented from the Appender interface. No separator needed at this level.

Specified by:
addSeparator in interface Appender

getObject

public java.lang.Object getObject(java.lang.String name)
Get a child object by name

Specified by:
getObject in interface Appender
Parameters:
name - the name of the menu bar
Returns:
the child

getObject

public java.lang.Object getObject(java.lang.Object menu,
                                  java.lang.String name)
Get a child object by name

Parameters:
meu - the menu or submenu to be searched
name - the name of the menu bar
Returns:
the child