Maps API for JavaScript Developer's Guide

H.ui.base.RadioGroup

Class Summary

Extends: H.ui.base.Container

This class represents a group of push buttons of which only one can be active at a time.

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

setTitle (title, opt_force) : {H.ui.base.RadioGroup}

This method set the title of this group.

getTitle () : {string}

This method returns the current title string of this group.

addButton (button) : {H.ui.base.RadioGroup}

This method adds an button element to this group.

removeButton (button) : {H.ui.base.RadioGroup}

This method removes an button element from this group.

getButtons () : {Array<H.ui.base.PushButton>}

This method returns the buttons currently registered with this group.

setActiveButton (button, opt_suppressEvent)

This method sets the active button of this radio group.

addChild (child) : {H.ui.base.Container}

Adds a child element to be rendered within the container element.

getChildren () : {Array<H.ui.base.Element>}

Returns the child collection of this container.

removeChild (child)

Removes a child element from this container's child collection.

addEventListener (type, handler, opt_capture, opt_scope)

This method allows to listen for specific event triggered by the object

removeEventListener (type, handler, opt_capture, opt_scope)

This method will removed previously added listener from the event target

renderInternal (element, doc)

This method is the concrete implementation of the UI element. This method receives the pre-rendered HTML element which may be modified by deriving classes.

isDisabled () : {boolean}

This method returns this UI element's disabled state as a boolean value.

setDisabled (disabled, opt_force) : {H.ui.base.Element}

This method set's the disabled state of this UI element.

getData () : {*}

This method returns a previously stored arbitrary data from this element.

setData (data)

This method stores arbitrary data with this UI element.

getElement () : {?HTMLElement}

This method returns the HTML element this UI element renders.

setVisibility (visibility)

Sets the visibility of this element.

getVisibility () : {boolean}

Returns the visibility of this element.

addClass (className) : {H.ui.base.Element}

This method adds a CSS class to this UI element (if it is not already present).

removeClass (className) : {H.ui.base.Element}

This method removes a CSS class from this UI element (if it is present).

Events Summary

Table 2. Events
Events

activebuttonchange : {H.util.Event}

This event is fired when a radio button becomes active.

statechange : {H.util.Event}

This event is fired when RadioGroup's state is modified.

Class Description

This class represents a group of push buttons of which only one can be active at a time.

Constructor Details

H.ui.base.RadioGroup(opt_options)

Parameters:
 
opt_options:
{H.ui.base.RadioGroup.Options=} [optional]
 
optional parameters to be passed to the group

Method Details

setTitle (title, opt_force) : {H.ui.base.RadioGroup}

This method set the title of this group.

Parameters:
 
title:
{string}
 
the new title of this group
opt_force:
{boolean=} [optional]
 
an optional flag indicating that the new value is to be updated and propagated even if it has the same value as the current title
Returns:
 
{H.ui.base.RadioGroup}
this group instance

getTitle () : {string}

This method returns the current title string of this group.

Returns:
 
{string}
the current title

addButton (button) : {H.ui.base.RadioGroup}

This method adds an button element to this group.

Parameters:
 
button:
{H.ui.base.PushButton}
 
the button to add
Returns:
 
{H.ui.base.RadioGroup}
this group instance

removeButton (button) : {H.ui.base.RadioGroup}

This method removes an button element from this group.

Parameters:
 
button:
{H.ui.base.PushButton}
 
the button to remove
Returns:
 
{H.ui.base.RadioGroup}
this group instance

getButtons () : {Array<H.ui.base.PushButton>}

This method returns the buttons currently registered with this group.

Returns:
 
{Array<H.ui.base.PushButton>}
the buttons

setActiveButton (button, opt_suppressEvent)

This method sets the active button of this radio group.

Parameters:
 
button:
{H.ui.base.PushButton}
 
the button to be made the active one
opt_suppressEvent:
{boolean=} [optional]
 
an optional boolean flag indicating that no statechange event is to be fired

addChild (child) : {H.ui.base.Container}

Adds a child element to be rendered within the container element.

Parameters:
 
child:
{H.ui.base.Element}
 
the child element to be added
Returns:
 
{H.ui.base.Container}
this container instance

getChildren () : {Array<H.ui.base.Element>}

Returns the child collection of this container.

Returns:
 
{Array<H.ui.base.Element>}
the children of this container

removeChild (child)

Removes a child element from this container's child collection.

Parameters:
 
child:
{H.ui.base.Element}
 
the child element to be removed

addEventListener (type, handler, opt_capture, opt_scope)

This method allows to listen for specific event triggered by the object

Parameters:
 
type:
{string}
 
name of event
handler:
{!Function}
 
event handler function
opt_capture:
{boolean=} [optional]
 
if set to true will listen in the capture phase (bubble otherwise)
opt_scope:
{Object=} [optional]
 
scope for the handler function

removeEventListener (type, handler, opt_capture, opt_scope)

This method will removed previously added listener from the event target

Parameters:
 
type:
{string}
 
name of event
handler:
{!Function}
 
previously added event handler
opt_capture:
{boolean=} [optional]
 
if set to true will listen in the capture phase (bubble otherwise)
opt_scope:
{Object=} [optional]
 
scope for the handler function

renderInternal (element, doc)

This method is the concrete implementation of the UI element. This method receives the pre-rendered HTML element which may be modified by deriving classes.

Parameters:
 
element:
{Element}
 
this UI element's HTML representation
doc:
{Document}
 
the HTML document into which the element is currently being rendered

isDisabled () : {boolean}

This method returns this UI element's disabled state as a boolean value.

Returns:
 
{boolean}
true if the element is disabled, false otherwise

setDisabled (disabled, opt_force) : {H.ui.base.Element}

This method set's the disabled state of this UI element.

Parameters:
 
disabled:
{boolean}
 
true to disabled the element, false to enabled it
opt_force:
{boolean=} [optional]
 
an optional boolean flag indicating that the value should be set and propagated even if it is the same as the current state
Returns:
 
{H.ui.base.Element}
this element instance

getData () : {*}

This method returns a previously stored arbitrary data from this element.

Returns:
 
{*}
the previously stored data object or null if not data was stored.

setData (data)

This method stores arbitrary data with this UI element.

Parameters:
 
data:
{*}
 
the data to be stored

getElement () : {?HTMLElement}

This method returns the HTML element this UI element renders.

Note: Before the UI element was rendered the method returns null.

Returns:
 
{?HTMLElement}
the element

setVisibility (visibility)

Sets the visibility of this element.

Parameters:
 
visibility:
{boolean}
 

getVisibility () : {boolean}

Returns the visibility of this element.

Returns:
 
{boolean}
visibility

addClass (className) : {H.ui.base.Element}

This method adds a CSS class to this UI element (if it is not already present).

Parameters:
 
className:
{string}
 
the CSS class name to add
Returns:
 
{H.ui.base.Element}
this UI element instance

removeClass (className) : {H.ui.base.Element}

This method removes a CSS class from this UI element (if it is present).

Parameters:
 
className:
{string}
 
the CSS class name to add
Returns:
 
{H.ui.base.Element}
this UI element instance

Event Details

activebuttonchange: {H.util.Event}

This event is fired when a radio button becomes active.

statechange: {H.util.Event}

This event is fired when RadioGroup's state is modified.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.