buoy.widget
Class BCheckBox
A BCheckBox is a Widget for making simple boolean selections. Clicking it with the mouse toggles
it on and off.
In addition to the event types generated by all Widgets, BCheckBoxes generate the following event types:
BCheckBox() - Create a new BCheckBox with no label, which is initially deselected.
|
BCheckBox(String text, boolean state) - Create a new BCheckBox.
|
Dimension | getMaximumSize() - Get the largest size at which this Widget can reasonably be drawn.
|
boolean | getState() - Get the selection state of this check box.
|
String | getText() - Get the text which appears on this check box.
|
void | setState(boolean selected) - Set the selection state of this check box.
|
void | setText(String text) - Set the text which appears on this check box.
|
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 |
BCheckBox
public BCheckBox()
Create a new BCheckBox with no label, which is initially deselected.
BCheckBox
public BCheckBox(String text,
boolean state)
Create a new BCheckBox.
text
- the text to display on the BCheckBoxstate
- the initial selection state of the BCheckBox
getMaximumSize
public Dimension getMaximumSize()
Get the largest size at which this Widget can reasonably be drawn. When a WidgetContainer lays out
its contents, it will attempt never to make this Widget larger than its maximum size.
- getMaximumSize in interface Widget
getState
public boolean getState()
Get the selection state of this check box.
getText
public String getText()
Get the text which appears on this check box.
setState
public void setState(boolean selected)
Set the selection state of this check box.
setText
public void setText(String text)
Set the text which appears on this check box.
Written by Peter Eastman.