buoy.widget
Class BCheckBoxMenuItem
- MenuWidget
public class BCheckBoxMenuItem
A BCheckBoxMenuItem is a menu item for making simple boolean selectons. Selecting it toggles
it on and off.
In addition to the event types generated by all Widgets, BCheckBoxMenuItems generate the following event types:
boolean | getState() - Get the selection state of this menu item.
|
void | setState(boolean selected) - Set the selection state of this menu item.
|
addEventLink , dispatchEvent , getBackground , getBounds , getComponent , getCursor , getFont , getMaximumSize , getMinimumSize , getName , getParent , getPreferredSize , hasFocus , isEnabled , isFocusable , isVisible , repaint , requestFocus , setBackground , setCursor , setEnabled , setFocusable , setFont , setName , setVisible |
BCheckBoxMenuItem
public BCheckBoxMenuItem()
Create a new BCheckBoxMenuItem with no label, which is initially deselected.
BCheckBoxMenuItem
public BCheckBoxMenuItem(String text,
Icon image,
boolean state)
Create a new BCheckBoxMenuItem.
text
- the text to display on the BCheckBoxMenuItemimage
- the image to display next to the menu itemstate
- the initial selection state of the BCheckBoxMenuItem
BCheckBoxMenuItem
public BCheckBoxMenuItem(String text,
boolean state)
Create a new BCheckBoxMenuItem.
text
- the text to display on the BCheckBoxMenuItemstate
- the initial selection state of the BCheckBoxMenuItem
BCheckBoxMenuItem
public BCheckBoxMenuItem(String text,
Shortcut shortcut,
Icon image,
boolean state)
Create a new BCheckBoxMenuItem.
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 BCheckBoxMenuItem
BCheckBoxMenuItem
public BCheckBoxMenuItem(String text,
Shortcut shortcut,
boolean state)
Create a new BCheckBoxMenuItem.
text
- the text to display on the BCheckBoxMenuItemshortcut
- a keyboard shortcut which will activate this menu itemstate
- the initial selection state of the BCheckBoxMenuItem
getState
public boolean getState()
Get the selection state of this menu item.
setState
public void setState(boolean selected)
Set the selection state of this menu item.
Written by Peter Eastman.