net.xoetrope.awt
Class XMenu

java.lang.Object
  extended by java.awt.MenuComponent
      extended by java.awt.MenuItem
          extended by java.awt.Menu
              extended by net.xoetrope.awt.XMenu
All Implemented Interfaces:
java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, XActionable, XAppender, XTextHolder

public class XMenu
extends java.awt.Menu
implements XTextHolder, XAppender, XActionable

A wrapper for menus

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

License: see license.txt

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Menu
java.awt.Menu.AccessibleAWTMenu
 
Nested classes/interfaces inherited from class java.awt.MenuItem
java.awt.MenuItem.AccessibleAWTMenuItem
 
Nested classes/interfaces inherited from class java.awt.MenuComponent
java.awt.MenuComponent.AccessibleAWTMenuComponent
 
Constructor Summary
XMenu()
          Creat a new menu
 
Method Summary
 void actionPerformed(java.lang.Object evt)
          Does nothing as actions are not supported in AWT
 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
 java.lang.String getText()
          Gets the text/caption
 void setAction(java.lang.Object action)
          Set an Action for the menu - does nothing
 void setText(java.lang.String newText)
          Set the menu caption/text
 void setup()
          Do any final setup needed
 
Methods inherited from class java.awt.Menu
add, add, addNotify, addSeparator, countItems, getAccessibleContext, getItem, getItemCount, insert, insert, insertSeparator, isTearOff, paramString, remove, remove, removeAll, removeNotify
 
Methods inherited from class java.awt.MenuItem
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getActionListeners, getLabel, getListeners, getShortcut, isEnabled, processActionEvent, processEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut
 
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, 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
addSeparator, setName
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

XMenu

public XMenu()
Creat a new menu

Method Detail

setAction

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

Specified by:
setAction in interface XActionable
Specified by:
setAction in interface XAppender
Parameters:
action - the action object

setup

public void setup()
Do any final setup needed

Specified by:
setup in interface XAppender

setText

public void setText(java.lang.String newText)
Set the menu caption/text

Specified by:
setText in interface XTextHolder
Parameters:
newText - the new menu text

getText

public java.lang.String getText()
Gets the text/caption

Specified by:
getText in interface XTextHolder
Returns:
the text value

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 text/caption for the new item

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 of the object (menu item) to locate
Returns:
the child

actionPerformed

public void actionPerformed(java.lang.Object evt)
Does nothing as actions are not supported in AWT

Parameters:
evt - the action event