Class: InputElementRadioGroup

InputElementRadioGroup

A Radio Button Group object, derived from labeled object

new InputElementRadioGroup(tag)

Parameters:
Name Type Description
tag string The name and id of this object.
Source:
Example
filterRBG = new InputElementRadioGroup('rbgFilter');

Extends

Methods

addButton(label, value)

adds a new radio button to the group
Parameters:
Name Type Description
label string The label for this radio button
value mixed The value to assign to this radio button
Source:

appendTo(parent)

Appends the radio button group and any label to a DOM node
Parameters:
Name Type Description
parent Object The DOM element to which this is added
Source:

disable()

Disables the object
Inherited From:
Source:

enable()

Enables the object
Inherited From:
Source:

getButton(index) → {object}

Retrieves the radio button specified
Parameters:
Name Type Description
index number The InputElementRadio object to retrieve
Source:
Returns:
The specified RadioButton object
Type
object

getGroupSize() → {number}

Retrieves the number of radio buttons in the group
Source:
Returns:
The number of radio buttons in this group
Type
number

getGUI()

Since this does not have a corresponding input, have an explicit method
Source:

getValue() → {mixed}

Retrieves the value of the currently selected radio button
Source:
Returns:
The value of the selected button
Type
mixed

onChange(listener)

Attaches an onchange handler to the object
Parameters:
Name Type Description
listener function The event listener to add
Inherited From:
Source:

onClick(listener)

Adds an onclick handler to each button in the group. This must be called AFTER all buttons have been added, since the listener is only added to known buttons.
Parameters:
Name Type Description
listener function The function to call on button click
Source:

selectButton(index)

Selects one of the buttons under program control
Parameters:
Name Type Description
index number The index of the radio button to select
Source:

selectButtonByLabel(index)

Selects one of the buttons based on its label
Parameters:
Name Type Description
index number The label of the radio button to select
Source:

setLabel(text)

Sets the text for the associated label.
Parameters:
Name Type Description
text string The label for the including object.
Inherited From:
Source:

setTextAlign(text)

Sets the text alignment for the associated label. Default is left.
Parameters:
Name Type Description
text string The desired alignment, either 'left' or 'right'
Inherited From:
Source: