Class: RadioButton

mvcomponents/button. RadioButton

Componente responsável por renderizar um RadioButton


new RadioButton(label, value)

Parameters:
Name Type Description
label string

Rótulo do RadioButton

value string | number

Valor do RadioButton

Example
let radioButton:RadioButton = new RadioButton("Feminino","F");
radioButton.setLabel("Sexo: ");

Extends

Methods


addEvent(type, handler)

Adiciona um novo listener ao componente

Parameters:
Name Type Description
type EMouseEvent | EKeyboardEvent
handler function
Inherited From:

isDisabled()

Verifica se o Radiobutton está desabilitado.

Returns:
Type
boolean
Example
let radioButton:RadioButton = new RadioButton("Feminino","F");
radioButton.isDisabled();

removeAllEvents( [callback])

Remove todos os listeners de um elemento

Parameters:
Name Type Argument Description
callback function <optional>
Inherited From:

removeEvent(type, handler)

Remove um listener do objeto

Parameters:
Name Type Description
type EMouseEvent | EKeyboardEvent
handler function
Inherited From:

setDisabled(disabled)

Desabilita ou habilita o RadioButton.

Parameters:
Name Type Description
disabled boolean
Returns:
Type
RadioButton
Example
let radioButton:RadioButton = new RadioButton("Feminino","F");
radioButton.setDisabled(false);

setLabel(icon)

Atribui ou substitui o rótulo do RadioButton.

Parameters:
Name Type Description
icon string
Returns:
Type
RadioButton
Example
let radioButton:RadioButton = new RadioButton("Feminino","F");
radioButton.setLabel("Sexo: ");

setName(name)

Atribui ou substitui o nome do input do RadioButton.

Parameters:
Name Type Description
name string
Returns:
Type
RadioButton
Example
let radioButton:RadioButton = new RadioButton("Feminino","F");
radioButton.setName("sexo");

setTooltip(tooltip)

Atribui ou substitui o Tooltip do RadioButton.

Parameters:
Name Type Description
tooltip string
Returns:
Type
RadioButton
Example
let radioButton:RadioButton = new RadioButton("Feminino","F");
radioButton.setTooltip('Tooltip do RadioButton');