Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


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

Constructors

UIRadioButton

public UIRadioButton();

Creates a radio button control with no content.

Remarks:

By default, the button's style is set to TOGGLE.

UIRadioButton

public UIRadioButton(String name);

Creates a radio button control with the specified text.

ParameterDescription
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.

UIRadioButton

public UIRadioButton(String name, int style);

Creates a radio button control using the specified text for content and the specified style.

ParameterDescription
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.

UIRadioButton

public UIRadioButton(IUIComponent comp);

Creates a radio button control with the specified component.

ParameterDescription
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.

UIRadioButton

public UIRadioButton(IUIComponent comp, int style);

Creates a radio button control with the specified component and style.

ParameterDescription
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.

Methods

getRoleCode

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.

paintCheck

public void paintCheck(FxGraphics g);

Draws the radio button image, according to the button control's current states.

Return Value:

No return value.

ParameterDescription
g The graphics context.

Remarks:

This method is called by paint, inherited through UICheckButton.

Overrides:

paintCheck(FxGraphics) in UICheckButton.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.