public final class CheckBox extends AndroidViewComponent implements android.widget.CompoundButton.OnCheckedChangeListener, android.view.View.OnFocusChangeListener
containerACCELEROMETER_SENSITIVITY_MODERATE, ACCELEROMETER_SENSITIVITY_STRONG, ACCELEROMETER_SENSITIVITY_WEAK, ALIGNMENT_CENTER, ALIGNMENT_NORMAL, ALIGNMENT_OPPOSITE, ASSET_DIRECTORY, BUTTON_SHAPE_DEFAULT, BUTTON_SHAPE_OVAL, BUTTON_SHAPE_RECT, BUTTON_SHAPE_ROUNDED, COLOR_BLACK, COLOR_BLUE, COLOR_CYAN, COLOR_DEFAULT, COLOR_DKGRAY, COLOR_GRAY, COLOR_GREEN, COLOR_LTGRAY, COLOR_MAGENTA, COLOR_NONE, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, DEFAULT_VALUE_COLOR_BLACK, DEFAULT_VALUE_COLOR_BLUE, DEFAULT_VALUE_COLOR_CYAN, DEFAULT_VALUE_COLOR_DEFAULT, DEFAULT_VALUE_COLOR_DKGRAY, DEFAULT_VALUE_COLOR_GRAY, DEFAULT_VALUE_COLOR_GREEN, DEFAULT_VALUE_COLOR_LTGRAY, DEFAULT_VALUE_COLOR_MAGENTA, DEFAULT_VALUE_COLOR_NONE, DEFAULT_VALUE_COLOR_ORANGE, DEFAULT_VALUE_COLOR_PINK, DEFAULT_VALUE_COLOR_RED, DEFAULT_VALUE_COLOR_WHITE, DEFAULT_VALUE_COLOR_YELLOW, DIRECTION_EAST, DIRECTION_MAX, DIRECTION_MIN, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_NORTHEAST, DIRECTION_NORTHWEST, DIRECTION_SOUTH, DIRECTION_SOUTHEAST, DIRECTION_SOUTHWEST, DIRECTION_WEST, FONT_DEFAULT_SIZE, LAYOUT_ORIENTATION_HORIZONTAL, LAYOUT_ORIENTATION_VERTICAL, LENGTH_FILL_PARENT, LENGTH_PREFERRED, LENGTH_UNKNOWN, SLIDER_MAX_VALUE, SLIDER_MIN_VALUE, SLIDER_THUMB_VALUE, TOAST_LENGTH_LONG, TOAST_LENGTH_SHORT, TYPEFACE_DEFAULT, TYPEFACE_MONOSPACE, TYPEFACE_SANSSERIF, TYPEFACE_SERIF| Constructor and Description |
|---|
CheckBox(ComponentContainer container)
Creates a new CheckBox component.
|
| Modifier and Type | Method and Description |
|---|---|
int |
BackgroundColor()
Returns the checkbox's background color as an alpha-red-green-blue
integer.
|
void |
BackgroundColor(int argb)
Specifies the checkbox's background color as an alpha-red-green-blue
integer.
|
void |
Changed()
Default Changed event handler.
|
boolean |
Checked()
Returns true if the checkbox is checked.
|
void |
Checked(boolean value)
Checked property setter method.
|
boolean |
Enabled()
Returns true if the checkbox is active and clickable.
|
void |
Enabled(boolean enabled)
Specifies whether the checkbox should be active and clickable.
|
boolean |
FontBold()
Returns true if the checkbox's text should be bold.
|
void |
FontBold(boolean bold)
Specifies whether the checkbox's text should be bold.
|
boolean |
FontItalic()
Returns true if the checkbox's text should be italic.
|
void |
FontItalic(boolean italic)
Specifies whether the checkbox's text should be italic.
|
float |
FontSize()
Returns the checkbox's text's font size, measured in pixels.
|
void |
FontSize(float size)
Specifies the checkbox's text's font size, measured in pixels.
|
int |
FontTypeface()
Returns the checkbox's text's font face as default, serif, sans
serif, or monospace.
|
void |
FontTypeface(int typeface)
Specifies the checkbox's text's font face as default, serif, sans
serif, or monospace.
|
android.view.View |
getView()
Returns the
View that is displayed in the UI. |
void |
GotFocus()
Default GotFocus event handler.
|
void |
LostFocus()
Default LostFocus event handler.
|
void |
onCheckedChanged(android.widget.CompoundButton buttonView,
boolean isChecked) |
void |
onFocusChange(android.view.View previouslyFocused,
boolean gainFocus) |
java.lang.String |
Text()
Returns the text displayed by the checkbox.
|
void |
Text(java.lang.String text)
Specifies the text displayed by the checkbox.
|
int |
TextColor()
Returns the checkbox's text color as an alpha-red-green-blue
integer.
|
void |
TextColor(int argb)
Specifies the checkbox's text color as an alpha-red-green-blue
integer.
|
Column, Column, CopyHeight, CopyWidth, getDispatchDelegate, Height, Height, Row, Row, Visible, Visible, Width, Widthpublic CheckBox(ComponentContainer container)
container - container, component will be placed inpublic android.view.View getView()
AndroidViewComponentView that is displayed in the UI.getView in class AndroidViewComponentpublic void Changed()
public void GotFocus()
public void LostFocus()
public int BackgroundColor()
public void BackgroundColor(int argb)
argb - background RGB color with alphapublic boolean Enabled()
true indicates enabled, false disabledpublic void Enabled(boolean enabled)
enabled - true for enabled, false disabledpublic boolean FontBold()
true indicates bold, false normalpublic void FontBold(boolean bold)
bold - true indicates bold, false normalpublic boolean FontItalic()
true indicates italic, false normalpublic void FontItalic(boolean italic)
italic - true indicates italic, false normalpublic float FontSize()
public void FontSize(float size)
size - font size in pixelpublic int FontTypeface()
public void FontTypeface(int typeface)
typeface - one of Component.TYPEFACE_DEFAULT,
Component.TYPEFACE_SERIF,
Component.TYPEFACE_SANSSERIF or
Component.TYPEFACE_MONOSPACEpublic java.lang.String Text()
public void Text(java.lang.String text)
text - new caption for checkboxpublic int TextColor()
public void TextColor(int argb)
argb - text RGB color with alphapublic boolean Checked()
true indicates checked, false uncheckedpublic void Checked(boolean value)
value - true indicates checked, false uncheckedpublic void onCheckedChanged(android.widget.CompoundButton buttonView,
boolean isChecked)
onCheckedChanged in interface android.widget.CompoundButton.OnCheckedChangeListenerpublic void onFocusChange(android.view.View previouslyFocused,
boolean gainFocus)
onFocusChange in interface android.view.View.OnFocusChangeListener