Package com.ms.awt Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class MenuItemX

Constructor , Methods

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();
}

The MenuItemX class creates a menu item that can be subsequently added to a menu bar.


Constructor


MenuItemX

public MenuItemX(String s, int i1, int i2)

Creates a menu item having the given name, identifier and flags.

Return Value:

No return value.

ParameterDescription
s The name (label) of the menu item.
i1 The identifier value.
i2 The flags value. Can be a combination of these values:
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 menut item in the menu.


Methods


Check

public void Check(boolean val)

Checks or unchecks the menu item.

Return Value:

No return value.

ParameterDescription
val Checks the item if true, unchecks the item if false.


isChecked

public boolean isChecked()

Returns a value indicating whether the menu item is checked.

Return Value:

Returns true if the item is checked, false otherwise.


getID

public int getID()

Returns the identifier set for the menu item by the constructor.

Return Value:

Return the identifier.


setState

public void setState(boolean t)

Sets the item state.

Return Value:

No return value.

ParameterDescription
t The state to set.

Remarks:

This method carries out no action.


addNotify

public synchronized void addNotify() 

Notifies the component when an item is added.

Return Value:

No return value.



Top© 1996 Microsoft Corporation. All rights reserved.