public class BCheckBox extends Widget
In addition to the event types generated by all Widgets, BCheckBoxes generate the following event types:
Constructor and Description |
---|
BCheckBox()
Create a new BCheckBox with no label, which is initially deselected.
|
BCheckBox(java.lang.String text,
boolean state)
Create a new BCheckBox.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.JCheckBox |
getComponent()
Get the java.awt.Component corresponding to this Widget.
|
java.awt.Dimension |
getMaximumSize()
Get the largest size at which this Widget can reasonably be drawn.
|
boolean |
getState()
Get the selection state of this check box.
|
java.lang.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(java.lang.String text)
Set the text which appears on this check box.
|
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible
addEventLink, addEventLink, removeEventLink
public BCheckBox()
public BCheckBox(java.lang.String text, boolean state)
text
- the text to display on the BCheckBoxstate
- the initial selection state of the BCheckBoxpublic javax.swing.JCheckBox getComponent()
Widget
getComponent
in class Widget
public boolean getState()
public void setState(boolean selected)
public java.lang.String getText()
public void setText(java.lang.String text)
public java.awt.Dimension getMaximumSize()
getMaximumSize
in class Widget
Written by Peter Eastman.