MenuItem.MenuItem

Overview | Methods | This Package | All Packages

MenuItem.MenuItem

Creates a MenuItem object.

Syntax

public MenuItem()

public MenuItem( String text )

public MenuItem( String text, EventHandler onClick )

public MenuItem( String text, EventHandler onClick, MenuItem[] items )

public MenuItem( int mergeType, int mergeOrder, int shortcut, String text, EventHandler onClick, EventHandler onPopup, EventHandler onSelect, MenuItem[] items )

Parameters

text

The text of the menu item.

onClick

The EventHandler object that handles the click event for this menu item.

items

An array of MenuItem objects that specifies the items that this menu item will contain. Unless this parameter is empty or null, this menu item is a submenu.

mergeType

A constant that specifies how this menu item behaves if the menu that it contains is merged with another menu. This value must be one of the enumeration constants specified in the MenuMerge class.

mergeOrder

The relative position that this item assumes to other items in a merged menu.

shortcut

The shortcut key that corresponds to this menu item. This value must be one of the enumeration constants defined in the Key class.

onPopup

The EventHandler object that handles this menu item's popup event. This event is fired only for menu items that are submenus.

onSelect

The EventHandler object that handles the menu item's select event. This event is fired only for menu items that are submenus.