Report an issue
Class

CKEDITOR.ui.dialog.radio

class

A group of radio buttons.

Filtering

Properties

Methods

  • constructor( dialog, elementDefinition, htmlList ) → radio

    Creates a radio class instance.

    Parameters

    dialog : dialog

    Parent dialog window object.

    elementDefinition : uiElement

    The element definition. Accepted fields:

    • default (Required) The default value.
    • validate (Optional) The validation function.
    • items (Required) An array of options. Each option is a one- or two-item array of format [ 'Description', 'Value' ]. If 'Value' is missing, then the value would be assumed to be the same as the description.
    htmlList : Array

    List of HTML code to output to.

    Returns

    radio
  • accessKeyDown( dialog, key )

    The default handler for a UI element's access key down event, which tries to put focus to the UI element.

    Can be overridded in child classes for more sophisticaed behavior.

    Parameters

    dialog : dialog

    The parent dialog object.

    key : String

    The key combination pressed. Since access keys are defined to always include the CTRL key, its value should always include a 'CTRL+' prefix.

  • accessKeyUp()

    Handler for the access key up event. Focuses the currently selected radio button, or the first radio button if none is selected.

  • disable()

    Disables a UI element.

  • enable()

    Enables a UI element.

  • focus() → uiElement

    chainable

    Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page.

    uiElement.focus();
    

    Returns

    uiElement

    this

  • getDialog() → dialog

    Gets the parent dialog object containing this UI element.

    var dialog = uiElement.getDialog();
    

    Returns

    dialog

    Parent dialog object.

  • getElement() → element

    Gets the root DOM element of this dialog UI object.

    uiElement.getElement().hide();
    

    Returns

    element

    Root DOM element of UI object.

  • getInputElement() → element

    Gets the DOM element that the user inputs values.

    This function is used by setValue, getValue and focus. It should be overrided in child classes where the input element isn't the root element.

    var rawValue = textInput.getInputElement().$.value;
    

    Returns

    element

    The element where the user input values.

  • getLabel() → String

    Retrieves the current label text of the elment.

    Returns

    String

    The current label text.

  • getValue() → String

    Gets the value of the currently selected radio button.

    Returns

    String

    The currently selected button's value.

  • isChanged() → Boolean

    Tells whether the UI object's value has changed.

    if ( uiElement.isChanged() )
        confirm( 'Value changed! Continue?' );
    

    Returns

    Boolean

    true if changed, false if not changed.

  • isEnabled() → Boolean

    Determines whether an UI element is enabled or not.

    Returns

    Boolean

    Whether the UI element is enabled.

  • isFocusable() → Boolean

    Determines whether an UI element is focus-able or not. Focus-able is defined as being both visible and enabled.

    Returns

    Boolean

    Whether the UI element can be focused.

  • isVisible() → Boolean

    Determines whether an UI element is visible or not.

    Returns

    Boolean

    Whether the UI element is visible.

  • registerEvents( definition ) → uiElement

    chainable

    Registers the on* event handlers defined in the element definition.

    The default behavior of this function is:

    1. If the on* event is defined in the class's eventProcesors list, then the registration is delegated to the corresponding function in the eventProcessors list.
    2. If the on* event is not defined in the eventProcessors list, then register the event handler under the corresponding DOM event of the UI element's input DOM element (as defined by the return value of getInputElement).

    This function is only called at UI element instantiation, but can be overridded in child classes if they require more flexibility.

    Parameters

    definition : uiElement

    The UI element definition.

    Returns

    uiElement

    this

  • selectParentTab() → uiElement

    chainable

    Selects the parent tab of this element. Usually called by focus() or overridden focus() methods.

    focus : function() {
        this.selectParentTab();
        // do something else.
    }
    

    Returns

    uiElement

    this

  • setLabel( label ) → labeledElement

    chainable

    Sets the label text of the element.

    Parameters

    label : String

    The new label text.

    Returns

    labeledElement

    The current labeled element.

  • setValue( value, noChangeEvent )

    Selects one of the radio buttons in this button group.

    Parameters

    value : String

    The value of the button to be chcked.

    noChangeEvent : Boolean

    Internal commit, to supress the change event on this element.

Events

  • change( evt )

    Fired when the value of the uiElement is changed.

    Parameters

    evt : eventInfo