Class UIRadioButton
public class UIRadioButton extends UICheckButton
{
// Constructors
public UIRadioButton();
public UIRadioButton(String name);
public UIRadioButton(String name, int style);
public UIRadioButton(IUIComponent comp);
public UIRadioButton(IUIComponent comp, int style);
// Methods
public int getRoleCode();
public void paintCheck(FxGraphics g);
}
This class implements a radio button control. By default, UIRadioButton uses the system-defined radio button image.
For more information about buttons, see the UIButton overview.
Note The behavior of the action method is not identical to the behavior of similar AWT components. For more information, see the overview information in UIButton.
Note The hot-track color is the same color as the button text color. As a result, hot-tracking does not appear to be functional.
UIComponent
|
+--UIContainer
|
+--UIStateContainer
|
+--UISingleContainer
|
+--UIButton
|
+--UICheckButton
|
+--UIRadioButton
public UIRadioButton();
Creates a radio button control with no content.
Remarks:
By default, the button's style is set to TOGGLE.
public UIRadioButton(String name);
Creates a radio button control with the specified text.
Parameter | Description |
name
| The text to be displayed with the radio button image.
|
Remarks:
By default, the button is hot-tracked and its style is set to TOGGLE. To create a button that is not hot-tracked, pass a UIText object instead of a String. For more information about hot-tracking, see the UIButton overview.
public UIRadioButton(String name, int style);
Creates a radio button control using the specified text for content and the specified style.
Parameter | Description |
name
| The text to be displayed with the radio button image.
|
style
| The style of the button. Possible values include TOGGLE or TRITOGGLE.
|
Remarks:
By default, the button is hot-tracked. To create a button that is not hot-tracked, pass a UIText object instead of a String. For more information about hot-tracking, see the UIButton overview.
Exceptions:
IllegalArgumentException
if an undefined style was specified.
public UIRadioButton(IUIComponent comp);
Creates a radio button control with the specified component.
Parameter | Description |
comp
| The component to be displayed with the radio button image.
|
Remarks:
Typically, you'll pass a UIText, a UIGraphic, or a UIItem object for the component. By default, the button's style is set to TOGGLE. For examples of how to construct buttons, see the UIButton overview.
public UIRadioButton(IUIComponent comp, int style);
Creates a radio button control with the specified component and style.
Parameter | Description |
comp
| The component to be displayed with the radio button image.
|
style
| The style of the button. Possible values include TOGGLE or TRITOGGLE.
|
Remarks:
Typically, you'll pass a UIText, a UIGraphic, or a UIItem object for the component. For examples of how to construct buttons, see the UIButton overview.
Exceptions:
IllegalArgumentException
if an undefined style was specified.
public int getRoleCode();
Retrieves the ROLE_SYSTEM code that best describes the role of the radio button.
Return Value:
Returns the ROLE_SYSTEM_RADIOBUTTON code.
Overrides:
getRoleCode() in UICheckButton.
public void paintCheck(FxGraphics g);
Draws the radio button image, according to the button control's current states.
Return Value:
No return value.
Parameter | Description |
g
| The graphics context.
|
Remarks:
This method is called by paint, inherited through UICheckButton.
Overrides:
paintCheck(FxGraphics) in UICheckButton.