All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xu.xu_MenuItem

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.AbstractButton
                                   |
                                   +----com.sun.java.swing.JMenuItem
                                           |
                                           +----xu.xu_MenuItem

public class xu_MenuItem
extends JMenuItem

A JMenuItem which has an attribute list. Its purpose is to be created from an XML configuration file with an arbitrary list of attributes, which can be interrogated by the action which it invokes. The benefit of this is that several menu items can be associated with a single action, but the behaviour of the action can be different for each one. (For example, the menu item may include the pathname of a file upon which it is to operate - such as for displaying help).

xu_MenuItem objects can be treated exactly the same as JMenuItem objects - this class offers exactly the same set of constructors. The *only* difference is the ability to set and retrieve an attribute list.


Variable Index

 o MenuItemAttList
The attributes associated with this menu item.

Constructor Index

 o xu_MenuItem()
Default constructor, to create a menu item with no set text or icon.
 o xu_MenuItem(Icon)
Constructor, to create a menu item with an icon.
 o xu_MenuItem(String)
Constructor, to create a menu item with text.
 o xu_MenuItem(String, Icon)
Constructor, to create a menu item with text and an icon.
 o xu_MenuItem(String, int)
Constructor, to create a menu item with text and a keyboard mnemonic.

Method Index

 o getAttList()
Get the attributes associated with this menu item.
 o setAttList(xg_AttList)
Set the attributes associated with this menu item.

Variables

 o MenuItemAttList
 protected xg_AttList MenuItemAttList
The attributes associated with this menu item.

Constructors

 o xu_MenuItem
 public xu_MenuItem()
Default constructor, to create a menu item with no set text or icon.

Parameters:
InputActionName - The name of the action
 o xu_MenuItem
 public xu_MenuItem(Icon InputIcon)
Constructor, to create a menu item with an icon.

Parameters:
InputIcon - The icon of the menu item.
 o xu_MenuItem
 public xu_MenuItem(String InputText)
Constructor, to create a menu item with text.

Parameters:
InputText - The text of the menu item.
 o xu_MenuItem
 public xu_MenuItem(String InputText,
                    Icon InputIcon)
Constructor, to create a menu item with text and an icon.

Parameters:
InputText - The text of the menu item.
InputIcon - The icon of the menu item.
 o xu_MenuItem
 public xu_MenuItem(String InputText,
                    int InputKeyboardMnemonic)
Constructor, to create a menu item with text and a keyboard mnemonic.

Parameters:
InputText - The text of the menu item.
InputKeyboardMnemonic - The keyboard mnemonic of the menu item.

Methods

 o setAttList
 public void setAttList(xg_AttList InputAttList)
Set the attributes associated with this menu item.

 o getAttList
 public xg_AttList getAttList()
Get the attributes associated with this menu item. return The attribute list of this item


All Packages  Class Hierarchy  This Package  Previous  Next  Index