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)
Creates a radio-button with the specified parent and name.

Method Summary
public boolean getEnable()
Determines whether this radio-button is enabled or not.
public CATRadioButtonGroup getGroup()
Returns the radio-button group.
public boolean getState()
Returns the radio-button state.
public CATNotification getStateChangedNotification()
Returns the radio-button state changed notification.
public String getTitle()
Returns the radio button's title.
public void setEnable(boolean iEnable)
Enables or disables this radio-button.
public void setGroup(CATRadioButtonGroup iGroup)
Sets the radio-button group.
public void setState(boolean iState)
Sets the radio-button state.
public void setTitle(String iTitle)
Sets the radio button's title.


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

getEnable

    public boolean getEnable()

Determines whether this radio-button is enabled or not.

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

getGroup

    public CATRadioButtonGroup getGroup()

Returns the radio-button group.

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

getState

    public boolean getState()

Returns the radio-button state.

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

getStateChangedNotification

    public CATNotification getStateChangedNotification()

Returns the radio-button state changed notification.

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

Return:
The radio-button state changed notification.

getTitle

    public 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).

Return:
This radio button's title.

setEnable

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

setGroup

    public void setGroup(CATRadioButtonGroup iGroup)

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

Parameters:
iGroup
The group this radio button belongs to.

setState

    public 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"

setTitle

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


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