{"size": 664, "ext": "js", "max_stars_repo_path": "projects/P1/js/gui/ui-checkbox.js", "max_stars_repo_name": "rimij405/igme330", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "projects/P1/js/gui/ui-checkbox.js", "max_issues_repo_name": "rimij405/igme330", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "projects/P1/js/gui/ui-checkbox.js", "max_forks_repo_name": "rimij405/igme330", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.6666666667, "max_line_length": 81, "alphanum_fraction": 0.6265060241}
/*
    ui-checkbox.js - Ian Effendi
    Contains checkbox form element analogy.
*/
"use strict";

// Checkbox elements will call a method on value change.
class UICheckbox extends BaseUIElement {
    
    // Creates a checkbox based off of input DOM selector.
    constructor(selector) {   
        super(selector); // call the parent class constructor.
        
        // Update type.
        this.type = "UICheckbox";
    }    
    
    // Set the callback function AND rig it to on click.
    setCallback(func) {
        super.setCallback(func); // set the callback function to input parameter.
        this.rig('onchecked');
    }   
    
} // end UICheckbox.