Class awt.MenuItem
All Packages    This Package    Previous    Next

Class awt.MenuItem

java.lang.Object
   |
   +----awt.MenuItem

public class MenuItem
extends Object
A string item that represents a choice in a menu.
Version:
1.14 31 Jan 1995
Author:
Sami Shaio

index
label
menu

MenuItem()
MenuItem(String, Menu)
Constructs a MenuItem.
MenuItem(String, Menu, boolean)
Constructs a MenuItem that has a checkmark associated with it.

disable()
Makes this menu item unselectable by the user.
dispose()
Dispose of this menu item.
enable()
Makes this menu item selectable by the user.
getMarkState()
Returns the state of this MenuItem.
selected()
setMark(boolean)
Sets the state of this MenuItem if it is a toggle.

index
  public int index
menu
  public Menu menu
label
  public String label

MenuItem
  protected MenuItem()
MenuItem
  public MenuItem(String l,
                  Menu m)
Constructs a MenuItem.
Parameters:
l - is the label for this menu item.
m - is the menu to add this item to.

MenuItem

  public MenuItem(String l,
                  Menu m,
                  boolean isToggle)
Constructs a MenuItem that has a checkmark associated with it.

setMark
  public void setMark(boolean t)
Sets the state of this MenuItem if it is a toggle.

getMarkState

  public boolean getMarkState()
Returns the state of this MenuItem. Only valid for a toggle.

enable

  public void enable()
Makes this menu item selectable by the user.

disable

  public void disable()
Makes this menu item unselectable by the user.

dispose

  public void dispose()
Dispose of this menu item. This removes it from the menu which contains it.

selected

  public void selected()

All Packages    This Package    Previous    Next