net.xoetrope.awt
Class XMenuBar

java.lang.Object
  extended by java.awt.MenuComponent
      extended by java.awt.MenuBar
          extended by net.xoetrope.awt.XMenuBar
All Implemented Interfaces:
java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, XAppender

public class XMenuBar
extends java.awt.MenuBar
implements XAppender

A wrapper for menus

Copyright: Copyright (c) Xoetrope Ltd., 2002-2003

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
XMenuBar()
          Create a new menu bar
 
Method Summary
 void addSeparator()
          Implemented from the XAppender interface.
 void append(java.lang.Object o, java.lang.String name)
          Appends the object o to this item
 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 net.xoetrope.xui.XAppender
setName
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

XMenuBar

public XMenuBar()
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 XAppender
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 XAppender

append

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

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

addSeparator

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

Specified by:
addSeparator in interface XAppender

getObject

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

Specified by:
getObject in interface XAppender
Parameters:
name - the name or caption
Returns:
the child menu