All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JCheckBoxMenuItem

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.AbstractButton
                                   |
                                   +----com.sun.java.swing.JMenuItem
                                           |
                                           +----com.sun.java.swing.JCheckBoxMenuItem

public class JCheckBoxMenuItem
extends JMenuItem
implements SwingConstants, Accessible
An implementation of a CheckBoxMenuItem


Variable Index

 o action

Constructor Index

 o JCheckBoxMenuItem()
Creates a checkboxMenuItem with no set text or icon.
 o JCheckBoxMenuItem(Icon)
Creates a checkboxMenuItem with an icon.
 o JCheckBoxMenuItem(String)
Creates a checkboxMenuItem with text.
 o JCheckBoxMenuItem(String, boolean)
Creates a checkboxMenuItem.
 o JCheckBoxMenuItem(String, Icon)
Creates a checkboxMenuItem.
 o JCheckBoxMenuItem(String, Icon, boolean)
Creates a checkboxMenuItem.

Method Index

 o getAccessibleRole()
Get the role of this object.
 o getSelectedObjects()
 o getState()
Returns the selected State of the JCheckBoxMenuItem.
 o getUIClassID()
 o init(String, Icon)
 o requestFocus()
Set focus on the receiving component if isRequestFocusEnabled returns true
 o setAction(Action)
Sets the action to be involed by the JCheckBoxMenuItem
 o setState(boolean)
Sets the selected State of the JCheckBoxMenuItem.
 o setUI(CheckBoxMenuItemUI)
Sets the checkboxMenuItem's UI.
 o updateUI()
Gets a new UI object from the default UIFactory.

Variables

 o action
 protected Action action

Constructors

 o JCheckBoxMenuItem
 public JCheckBoxMenuItem()
Creates a checkboxMenuItem with no set text or icon.

 o JCheckBoxMenuItem
 public JCheckBoxMenuItem(Icon icon)
Creates a checkboxMenuItem with an icon.

Parameters:
icon - the icon of the CheckBoxMenuItem.
 o JCheckBoxMenuItem
 public JCheckBoxMenuItem(String text)
Creates a checkboxMenuItem with text.

Parameters:
text - the text of the CheckBoxMenuItem.
 o JCheckBoxMenuItem
 public JCheckBoxMenuItem(String text,
                          Icon icon)
Creates a checkboxMenuItem.

Parameters:
text - the text of the CheckBoxMenuItem.
icon - the icon of the CheckBoxMenuItem.
 o JCheckBoxMenuItem
 public JCheckBoxMenuItem(String text,
                          boolean b)
Creates a checkboxMenuItem.

Parameters:
text - the text of the CheckBoxMenuItem.
b - the selected state of the checkboxmenuitem
 o JCheckBoxMenuItem
 public JCheckBoxMenuItem(String text,
                          Icon icon,
                          boolean b)
Creates a checkboxMenuItem.

Parameters:
text - the text of the CheckBoxMenuItem.
b - the selected state of the checkboxmenuitem

Methods

 o init
 protected void init(String text,
                     Icon icon)
Overrides:
init in class JMenuItem
 o setUI
 public void setUI(CheckBoxMenuItemUI ui)
Sets the checkboxMenuItem's UI.

Parameters:
ui - the new CheckBoxMenuItemUI
See Also:
getUI
 o updateUI
 public void updateUI()
Gets a new UI object from the default UIFactory.

Overrides:
updateUI in class JMenuItem
 o getUIClassID
 public String getUIClassID()
Returns:
"CheckBoxMenuItemUI"
Overrides:
getUIClassID in class JMenuItem
See Also:
getUIClassID, getUI
 o setAction
 public void setAction(Action action)
Sets the action to be involed by the JCheckBoxMenuItem

Parameters:
action - the Action
 o getState
 public boolean getState()
Returns the selected State of the JCheckBoxMenuItem.

 o setState
 public synchronized void setState(boolean b)
Sets the selected State of the JCheckBoxMenuItem.

 o getSelectedObjects
 public synchronized Object[] getSelectedObjects()
Overrides:
getSelectedObjects in class AbstractButton
 o requestFocus
 public void requestFocus()
Set focus on the receiving component if isRequestFocusEnabled returns true

Overrides:
requestFocus in class JMenuItem
 o getAccessibleRole
 public AccessibleRole getAccessibleRole()
Get the role of this object.

Returns:
an instance of AccessibleRole describing the role of the object
Overrides:
getAccessibleRole in class JMenuItem
See Also:
AccessibleRole

All Packages  Class Hierarchy  This Package  Previous  Next  Index