org.formaria.awt
Class Menu

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

public class Menu
extends java.awt.Menu
implements TextHolder, Appender, Actionable

A wrapper for menus

Copyright: Copyright (c) Formaria Ltd., 2008

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
Menu()
          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 org.formaria.aria.Appender
addSeparator, setName
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

Menu

public Menu()
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 Appender
Specified by:
setAction in interface Actionable
Parameters:
action - the action object

setup

public void setup()
Do any final setup needed

Specified by:
setup in interface Appender

setText

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

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

getText

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

Specified by:
getText in interface TextHolder
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 Appender
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 Appender
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