public class BCheckBoxMenuItem extends BMenuItem
In addition to the event types generated by all Widgets, BCheckBoxMenuItems generate the following event types:
| Constructor and Description |
|---|
BCheckBoxMenuItem()
Create a new BCheckBoxMenuItem with no label, which is initially deselected.
|
BCheckBoxMenuItem(java.lang.String text,
boolean state)
Create a new BCheckBoxMenuItem.
|
BCheckBoxMenuItem(java.lang.String text,
javax.swing.Icon image,
boolean state)
Create a new BCheckBoxMenuItem.
|
BCheckBoxMenuItem(java.lang.String text,
Shortcut shortcut,
boolean state)
Create a new BCheckBoxMenuItem.
|
BCheckBoxMenuItem(java.lang.String text,
Shortcut shortcut,
javax.swing.Icon image,
boolean state)
Create a new BCheckBoxMenuItem.
|
| Modifier and Type | Method and Description |
|---|---|
javax.swing.JMenuItem |
getComponent()
Get the java.awt.Component corresponding to this Widget.
|
boolean |
getState()
Get the selection state of this menu item.
|
void |
setState(boolean selected)
Set the selection state of this menu item.
|
getActionCommand, getIcon, getMnemonic, getShortcut, getText, setActionCommand, setIcon, setMnemonic, setShortcut, setTextaddEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisibleaddEventLink, addEventLink, removeEventLinkpublic BCheckBoxMenuItem()
public BCheckBoxMenuItem(java.lang.String text,
boolean state)
text - the text to display on the BCheckBoxMenuItemstate - the initial selection state of the BCheckBoxMenuItempublic BCheckBoxMenuItem(java.lang.String text,
javax.swing.Icon image,
boolean state)
text - the text to display on the BCheckBoxMenuItemimage - the image to display next to the menu itemstate - the initial selection state of the BCheckBoxMenuItempublic BCheckBoxMenuItem(java.lang.String text,
Shortcut shortcut,
boolean state)
text - the text to display on the BCheckBoxMenuItemshortcut - a keyboard shortcut which will activate this menu itemstate - the initial selection state of the BCheckBoxMenuItempublic BCheckBoxMenuItem(java.lang.String text,
Shortcut shortcut,
javax.swing.Icon image,
boolean state)
text - the text to display on the BCheckBoxMenuItemshortcut - a keyboard shortcut which will activate this menu itemimage - the image to display next to the menu itemstate - the initial selection state of the BCheckBoxMenuItempublic javax.swing.JMenuItem getComponent()
WidgetgetComponent in class BMenuItempublic boolean getState()
public void setState(boolean selected)
Written by Peter Eastman.