Package com.dassault_systemes.catjdialog

   
Class CATRadioButton

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catjdialog.CATCallbackSource
        |
        +-com.dassault_systemes.catjdialog.CATDialog
              |
              +-com.dassault_systemes.catjdialog.CATRadioButton
Class Location

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATRadioButton

The radio-button graphical component.

Description:

This is a labeled graphical component that can be in either an "on" (true) or "off" (false) state.
Clicking on a radio-button toggles its state. Radio buttons can be grouped (see CATRadioButtonGroup). In that case, only one radio-button at a time can be checked. Checking a radio-button from a group unchecks all radio-buttons from the group and checks this radio-button.
The application can be notified when its state changes.

CATRadioButton Properties:

CATRadioButton Notifications:

CATRadioButton Message Catalog Implicit Mappings:

See Also:
com.dassault_systemes.catjdialog.CATRadioButtonGroup
Field Summary

Constructor Summary
CATRadioButton(CATDialog iParent, String iName)

Method Summary
void setGroup(CATRadioButtonGroup iGroup)
CATRadioButtonGroup getGroup()
boolean getState()
void setState(boolean iState)
boolean getEnable()
void setEnable(boolean iEnable)
String getTitle()
void setTitle(String iTitle)
CATNotification getStateChangedNotification()


Field Detail

Constructor Detail

CATRadioButton

    CATRadioButton(CATDialog iParent, String iName)

Creates a radio-button with the specified parent and name.

Parameters:
iParent
The parent component.
iName
This radio-button name. Here are some rules for this name:
  • It is set in the constructor, and cannot be changed afterwards.
  • The name must be unique for the parent (2 children with the same name are not allowed).
  • The name may not contain any ot the following characters: '.' (dot), ' ' (blank), '_' (underscore)

Method Detail

setGroup

    void setGroup(CATRadioButtonGroup iGroup)

Sets the radio-button group. Default is null (no group).

Parameters:
iGroup
The group this radio button belongs to.

getGroup

    CATRadioButtonGroup getGroup()

Returns the radio-button group.

Returns:
The group this radio button belongs to (null means no group).

getState

    boolean getState()

Returns the radio-button state.

Returns:
true if this radio-button state is "on"; false otherwise.

setState

    void setState(boolean iState)

Sets the radio-button state.

Parameters:
iState
true to set it to the "on" state; false to set it to "off"

getEnable

    boolean getEnable()

Determines whether this radio-button is enabled or not.

Returns:
true if this radio-button is enabled; false otherwise.

setEnable

    void setEnable(boolean iEnable)

Enables or disables this radio-button.

A disabled radio-button doesn't change state and then doesn't fire its StateChanged notification.

Parameters:
iEnable
If true, this radio-button is enabled; otherwise it is disabled.

getTitle

    String getTitle()

Returns the radio button's title.

Returns the programmatic value if setTitle() has been called, or tries to retrieve its title from the associated message catalog file (<radiobutton_path>.Title entry).

Returns:
This radio button's title.

setTitle

    void setTitle(String iTitle)

Sets the radio button's title.

Calling this method sets programmatically the title. This should be reserved for cases where the title can only be determined by dynamic means.
The standard way of defining components messages is using CATNls catalog files (supports NLS).

Parameters:
iTitle
The string that is to be this radio button's title.

getStateChangedNotification

    CATNotification getStateChangedNotification()

Returns the radio-button state changed notification.

This notification is sent when the radio-button is checked or gets unchecked.

Returns:
The radio-button state changed notification.


Copyright © 2000, Dassault Systèmes. All rights reserved