Component | +--Control | +--RadioButtonpublic class RadioButton
Encapsulates a radio button control. The control is a small circle that has the given text displayed next to it, typically to its right. The control highlights the circle and sends a message to its parent window when the user selects the button. The control removes the highlight and sends a message when the button is next selected.
Constructors
Name | Description |
---|---|
RadioButton() | Creates a RadioButton control. |
Methods
Name | Description |
---|---|
addOnCheckedChanged(EventHandler handler) | Adds a listener to the OnCheckedChanged event. |
getAlignText() | Retrieves the current text alignment for this control. |
getAuto() | Retrieves a boolean value that indicates whether this button is checked, by default, where the button is a member of a group of buttons. |
getChecked() | Retrieves a boolean value that indicates whether the button is checked. |
getPushLike() | Retrieves a boolean value that indicates whether the button has the PushLike style set. |
onCheckedChanged(Event e) | The onCheckedChanged event occurs when the value of the Checked property changes. |
onClick(Event e) | The onClick event occurs when the user clicks on the RadioButton. |
performClick() | Simulates a user click on the control. |
removeOnCheckedChanged(EventHandler handler) | Removes an OnCheckedChanged event listener. |
setAlignText(int value) | Sets the text alignment on this control. |
setAuto(boolean value) | Specifies whether this button is automatically checked when it is a member of a group of buttons. |
setChecked(boolean value) | Sets the checked value for the button. |
setPushLike(boolean value) | Sets the PushLike style on the button. |
Creates a RadioButton control.
Adds a listener to the OnCheckedChanged event.
Returns one of the constants defined in the LeftRightAlignment class.
Retrieves the current text alignment for this control.
Returns true if the button is to be automatically checked; otherwise, returns false.
Retrieves a boolean value that indicates whether this button is checked, by default, where the button is a member of a group of buttons. Only one button in the group can be checked.
Returns true if the button is checked; otherwise, returns false.
Retrieves a boolean value that indicates whether the button is checked.
Returns true if the button is currently configured to behave like a push button; otherwise, returns false.
Retrieves a boolean value that indicates whether the button has the PushLike style set. Setting the PushLike style makes a radio button look and act like a push button. The button looks raised when it isn&#-110;t pushed or checked and sunken when it is pushed or checked.
The onCheckedChanged event occurs when the value of the Checked property changes.
The onClick event occurs when the user clicks on the RadioButton.
onClick(Event) in Control.
Simulates a user click on the control.
Removes an OnCheckedChanged event listener.
Sets the text alignment on this control.
Specifies whether this button is automatically checked when it is a member of a group of buttons. Only one radio button for a given container can be the auto button for the group.
Sets the checked value for the button.
Sets the PushLike style on the button. Setting the PushLike style makes a radio button look and act like a push button. The button looks raised when it isn&#-110;t pushed or checked,and sunken when it is pushed or checked.