Package com.ms.awt |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class MenuItemX extends CheckboxMenuItem { // Constructor public MenuItemX(String s, int i1, int i2); // Methods public void Check(boolean val); public boolean isChecked(); public int getID(); public void setState(boolean t); public synchronized void addNotify(); }
Creates a menu item that can be added to a menu bar.
public MenuItemX(String s, int i1, int i2);Creates a menu item having the given name, identifier and flags.
Return Value:
No return value.
Parameter Description s Name (label) of the menu item. i1 Identifier value. i2 Flags value. Can be a combination of the following:
POPUP Creates a popup menu having the given name (label). CHECKED Places a check mark next to the menu item name. SEPARATOR_NEXT Creates a menu item separator immediately after the given item. ENDMENU Marks the last menu item in the menu.
public void Check(boolean val);Checks or unchecks the menu item.
Return Value:
No return value.
Parameter Description val Checks the item if true, unchecks the item if false.
public boolean isChecked();Retrieves a value indicating whether the menu item is checked.
Return Value:
Returns true if the item is checked, or false otherwise.
public int getID();Retrieves the identifier set for the menu item by the constructor.
Return Value:
Return the identifier.
public void setState(boolean t);Sets the item state.
Return Value:
No return value.
Parameter Description t State to be set. Remarks:
This method carries out no action.
public synchronized void addNotify();Notifies the component when an item is added.
Return Value:
No return value.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.