Class java.awt.CheckboxMenuItem
All Packages This Package Previous Next
Class java.awt.CheckboxMenuItem
java.lang.Object
|
+----java.awt.MenuComponent
|
+----java.awt.MenuItem
|
+----java.awt.CheckboxMenuItem
-
public class
CheckboxMenuItem
-
extends MenuItem
This class produces a checkbox that represents a choice in a menu.
-
Version:
-
1.8, 09/08/95
-
Author:
-
Sami Shaio
-
CheckboxMenuItem(String)
-
Creates the checkbox item with the specified label.
-
addNotify()
-
Creates the peer of the checkbox item.
-
getState()
-
Returns the state of this MenuItem.
-
paramString()
-
Returns the parameter String of this button.
-
setState(boolean)
-
Sets the state of this MenuItem if it is a Checkbox.
CheckboxMenuItem
public CheckboxMenuItem(String label)
-
Creates the checkbox item with the specified label.
-
Parameters:
-
label
-
the button label
addNotify
public synchronized void addNotify()
-
Creates the peer of the checkbox item. This peer allows us to
change the look of the checkbox item without changing its
functionality.
-
Overrides:
-
addNotify in class MenuItem
getState
public boolean getState()
-
Returns the state of this MenuItem. This method is only valid for a
Checkbox.
setState
public void setState(boolean t)
-
Sets the state of this MenuItem if it is a Checkbox.
-
Parameters:
-
t
-
the specified state of the checkbox
paramString
public String paramString()
-
Returns the parameter String of this button.
-
Overrides:
-
paramString in class MenuItem
All Packages This Package Previous Next