API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. CheckboxMenuItem View Source
Author(s)
Sami Shaio
Since
JDK1.0
Version
1.72, 07/11/06
Serial
Hierarchy
 Object
      MenuComponent
          MenuItem
              CheckboxMenuItem
Implements
 ItemSelectable
 Accessible
Subclasses
Description
public class CheckboxMenuItem
  This class represents a check box that can be included in a menu.
See also:    ItemEvent ItemListener
Constructors
public CheckboxMenuItem () throws HeadlessException
  Create a check box menu item with an empty label.
public CheckboxMenuItem (String label) throws HeadlessException
  Create a check box menu item with the specified label.
public CheckboxMenuItem (String label, boolean state) throws HeadlessException
  Create a check box menu item with the specified label and state.
Methods
Hide/Show inherited methods
publicsynchronized void addActionListener (ActionListener l) [Inherited From MenuItem]
  Adds the specified action listener to receive action events from this menu item.
publicsynchronized void addItemListener (ItemListener l) [Specified in ItemSelectable]
  Adds the specified item listener to receive item events from this check box menu item.
public void addNotify () [Overrides MenuItem]
  Creates the peer of the checkbox item.
pack-private String constructComponentName () [Overrides MenuItem]
  Construct a name for this MenuComponent.
public void deleteShortcut () [Inherited From MenuItem]
  Delete any MenuShortcut object associated with this menu item.
pack-private void deleteShortcut (MenuShortcut s) [Inherited From MenuItem]
@Deprecated
publicsynchronized void disable () [Inherited From MenuItem]
protectedfinal void disableEvents (long eventsToDisable) [Inherited From MenuItem]
  Disables event delivery to this menu item for events defined by the specified event mask parameter.
publicfinal void dispatchEvent (AWTEvent e) [Inherited From MenuComponent]
  Delivers an event to this component or one of its sub components.
pack-private void dispatchEventImpl (AWTEvent e) [Inherited From MenuComponent]
pack-private void doMenuEvent (long when, int modifiers) [Overrides MenuItem]
@Deprecated
publicsynchronized void enable () [Inherited From MenuItem]
@Deprecated
public void enable (boolean b) [Inherited From MenuItem]
protectedfinal void enableEvents (long eventsToEnable) [Inherited From MenuItem]
  Enables event delivery to this menu item for events to be defined by the specified event mask parameter
pack-private boolean eventEnabled (AWTEvent e) [Overrides MenuItem]
pack-private int getAccessibleChildIndex (MenuComponent child) [Inherited From MenuComponent]
  Gets the index of the child within this MenuComponent.
public AccessibleContext getAccessibleContext () [Overrides MenuItem] [Specified in Accessible]
  Gets the AccessibleContext associated with this CheckboxMenuItem.
pack-private int getAccessibleIndexInParent () [Inherited From MenuComponent]
  Gets the index of this object in its accessible parent.
pack-private AccessibleStateSet getAccessibleStateSet () [Inherited From MenuComponent]
  Gets the state of this object.
public String getActionCommand () [Inherited From MenuItem]
  Gets the command name of the action event that is fired by this menu item.
pack-privatefinal String getActionCommandImpl () [Inherited From MenuItem]
publicsynchronized ActionListener getActionListeners () [Inherited From MenuItem]
  Returns an array of all the action listeners registered on this menu item.
pack-privatefinal Font getFont_NoClientCode () [Inherited From MenuComponent]
public Font getFont () [Inherited From MenuComponent]
  Gets the font used for this menu component.
publicsynchronized ItemListener getItemListeners ()
  Returns an array of all the item listeners registered on this checkbox menuitem.
public String getLabel () [Inherited From MenuItem]
  Gets the label for this menu item.
public T getListeners (Class< T> listenerType) [Overrides MenuItem]
  Returns an array of all the objects currently registered as FooListeners upon this CheckboxMenuItem.
public String getName () [Inherited From MenuComponent]
  Gets the name of the menu component.
pack-privatefinal MenuContainer getParent_NoClientCode () [Inherited From MenuComponent]
public MenuContainer getParent () [Inherited From MenuComponent]
  Returns the parent container for this menu component.
@Deprecated
public MenuComponentPeer getPeer () [Inherited From MenuComponent]
publicsynchronized Object getSelectedObjects () [Specified in ItemSelectable]
  Returns the an array (length 1) containing the checkbox menu item label or null if the checkbox is not selected.
public MenuShortcut getShortcut () [Inherited From MenuItem]
  Get the MenuShortcut object associated with this menu item,
pack-private MenuItem getShortcutMenuItem (MenuShortcut s) [Inherited From MenuItem]
public boolean getState ()
  Determines whether the state of this check box menu item is "on" or "off."
protectedfinal Object getTreeLock () [Inherited From MenuComponent]
  Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
pack-private boolean handleShortcut (KeyEvent e) [Inherited From MenuItem]
public boolean isEnabled () [Inherited From MenuItem]
  Checks whether this menu item is enabled.
public String paramString () [Overrides MenuItem]
  Returns a string representing the state of this CheckBoxMenuItem.
@Deprecated
public boolean postEvent (Event evt) [Inherited From MenuComponent]
  Posts the specified event to the menu.
protected void processActionEvent (ActionEvent e) [Inherited From MenuItem]
  Processes action events occurring on this menu item, by dispatching them to any registered ActionListener objects.
protected void processEvent (AWTEvent e) [Overrides MenuItem]
  Processes events on this check box menu item.
protected void processItemEvent (ItemEvent e)
  Processes item events occurring on this check box menu item by dispatching them to any registered ItemListener objects.
publicsynchronized void removeActionListener (ActionListener l) [Inherited From MenuItem]
  Removes the specified action listener so it no longer receives action events from this menu item.
publicsynchronized void removeItemListener (ItemListener l) [Specified in ItemSelectable]
  Removes the specified item listener so that it no longer receives item events from this check box menu item.
public void removeNotify () [Inherited From MenuComponent]
  Removes the menu component's peer.
public void setActionCommand (String command) [Inherited From MenuItem]
  Sets the command name of the action event that is fired by this menu item.
publicsynchronized void setEnabled (boolean b) [Inherited From MenuItem]
  Sets whether or not this menu item can be chosen.
public void setFont (Font f) [Inherited From MenuComponent]
  Sets the font to be used for this menu component to the specified font.
publicsynchronized void setLabel (String label) [Inherited From MenuItem]
  Sets the label for this menu item to the specified label.
public void setName (String name) [Inherited From MenuComponent]
  Sets the name of the component to the specified string.
public void setShortcut (MenuShortcut s) [Inherited From MenuItem]
  Set the MenuShortcut object associated with this menu item.
publicsynchronized void setState (boolean b)
  Sets this check box menu item to the specifed state.
public String toString () [Inherited From MenuComponent]
  Returns a representation of this menu component as a string.
Fields
Hide/Show inherited fields
pack-private AccessibleContext accessibleContext [Inherited From MenuComponent]
pack-private String actionCommand [Inherited From MenuItem]
  This field indicates the command tha has been issued by a particular menu item.
pack-privatetransient ActionListener actionListener [Inherited From MenuItem]
pack-privatefinalstatic String actionListenerK = "actionL" [Inherited From MenuComponent]
pack-privatetransient sun.awt.AppContext appContext [Inherited From MenuComponent]
  The AppContext of the MenuComponent.
pack-private boolean enabled [Inherited From MenuItem]
  A value to indicate whether a menu item is enabled or not.
pack-private long eventMask [Inherited From MenuItem]
  The eventMask is ONLY set by subclasses via enableEvents.
pack-private Font font [Inherited From MenuComponent]
  The menu component's font.
pack-privatetransient ItemListener itemListener
pack-privatefinalstatic String itemListenerK = "itemL" [Inherited From MenuComponent]
pack-private String label [Inherited From MenuItem]
  label is the label of a menu item.
pack-private boolean newEventsOnly [Inherited From MenuComponent]
  Defaults to false.
pack-privatetransient MenuContainer parent [Inherited From MenuComponent]
pack-privatetransient MenuComponentPeer peer [Inherited From MenuComponent]
pack-private boolean state
  The state of a checkbox menu item
Nested Classes
  CheckboxMenuItem.AccessibleAWTCheckboxMenuItem
Inner class of CheckboxMenuItem used to provide default support for accessibility.
  MenuItem.AccessibleAWTMenuItem
Inner class of MenuItem used to provide default support for accessibility.
  MenuComponent.AccessibleAWTMenuComponent
Inner class of MenuComponent used to provide default support for accessibility.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar