/**
 * Generated by Apache Royale Compiler from org\apache\royale\html\beads\models\ToggleButtonModel.as
 * org.apache.royale.html.beads.models.ToggleButtonModel
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.html.beads.models.ToggleButtonModel');

goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.events.EventDispatcher');
goog.require('org.apache.royale.core.IBead');
goog.require('org.apache.royale.core.ITextModel');
goog.require('org.apache.royale.core.IToggleButtonModel');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @constructor
 * @extends {org.apache.royale.events.EventDispatcher}
 * @implements {org.apache.royale.core.IBead}
 * @implements {org.apache.royale.core.IToggleButtonModel}
 * @implements {org.apache.royale.core.ITextModel}
 */
org.apache.royale.html.beads.models.ToggleButtonModel = function() {
  org.apache.royale.html.beads.models.ToggleButtonModel.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.beads.models.ToggleButtonModel, org.apache.royale.events.EventDispatcher);


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.html.beads.models.ToggleButtonModel', org.apache.royale.html.beads.models.ToggleButtonModel);


/**
 * @protected
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.html.beads.models.ToggleButtonModel.prototype._strand;


/**
 * @private
 * @type {string}
 */
org.apache.royale.html.beads.models.ToggleButtonModel.prototype.org_apache_royale_html_beads_models_ToggleButtonModel__text;


/**
 * @private
 * @type {string}
 */
org.apache.royale.html.beads.models.ToggleButtonModel.prototype.org_apache_royale_html_beads_models_ToggleButtonModel__html;


/**
 * @private
 * @type {boolean}
 */
org.apache.royale.html.beads.models.ToggleButtonModel.prototype.org_apache_royale_html_beads_models_ToggleButtonModel__selected;


org.apache.royale.html.beads.models.ToggleButtonModel.prototype.set__strand = function(value) {
  this._strand = value;
};


org.apache.royale.html.beads.models.ToggleButtonModel.prototype.get__text = function() {
  return this.org_apache_royale_html_beads_models_ToggleButtonModel__text;
};


org.apache.royale.html.beads.models.ToggleButtonModel.prototype.set__text = function(value) {
  if (value != this.org_apache_royale_html_beads_models_ToggleButtonModel__text) {
    this.org_apache_royale_html_beads_models_ToggleButtonModel__text = value;
    this.dispatchEvent(new org.apache.royale.events.Event("textChange"));
  }
};


org.apache.royale.html.beads.models.ToggleButtonModel.prototype.get__html = function() {
  return this.org_apache_royale_html_beads_models_ToggleButtonModel__html;
};


org.apache.royale.html.beads.models.ToggleButtonModel.prototype.set__html = function(value) {
  if (value != this.html) {
    this.org_apache_royale_html_beads_models_ToggleButtonModel__html = value;
    this.dispatchEvent(new org.apache.royale.events.Event("htmlChange"));
  }
};


org.apache.royale.html.beads.models.ToggleButtonModel.prototype.get__selected = function() {
  return this.org_apache_royale_html_beads_models_ToggleButtonModel__selected;
};


org.apache.royale.html.beads.models.ToggleButtonModel.prototype.set__selected = function(value) {
  if (value != this.org_apache_royale_html_beads_models_ToggleButtonModel__selected) {
    this.org_apache_royale_html_beads_models_ToggleButtonModel__selected = value;
    this.dispatchEvent(new org.apache.royale.events.Event("selectedChange"));
  }
};


Object.defineProperties(org.apache.royale.html.beads.models.ToggleButtonModel.prototype, /** @lends {org.apache.royale.html.beads.models.ToggleButtonModel.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.models.ToggleButtonModel.prototype.set__strand},
/**
  * @export
  * @type {string} */
text: {
get: org.apache.royale.html.beads.models.ToggleButtonModel.prototype.get__text,
set: org.apache.royale.html.beads.models.ToggleButtonModel.prototype.set__text},
/**
  * @export
  * @type {string} */
html: {
get: org.apache.royale.html.beads.models.ToggleButtonModel.prototype.get__html,
set: org.apache.royale.html.beads.models.ToggleButtonModel.prototype.set__html},
/**
  * @export
  * @type {boolean} */
selected: {
get: org.apache.royale.html.beads.models.ToggleButtonModel.prototype.get__selected,
set: org.apache.royale.html.beads.models.ToggleButtonModel.prototype.set__selected}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.html.beads.models.ToggleButtonModel.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'ToggleButtonModel', qName: 'org.apache.royale.html.beads.models.ToggleButtonModel', kind: 'class' }], interfaces: [org.apache.royale.core.IBead, org.apache.royale.core.IToggleButtonModel, org.apache.royale.core.ITextModel] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.models.ToggleButtonModel.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'writeonly', declaredBy: 'org.apache.royale.html.beads.models.ToggleButtonModel'},
        'text': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.models.ToggleButtonModel'},
        'html': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.models.ToggleButtonModel'},
        'selected': { type: 'Boolean', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.models.ToggleButtonModel'}
      };
    },
    methods: function () {
      return {
        'ToggleButtonModel': { type: '', declaredBy: 'org.apache.royale.html.beads.models.ToggleButtonModel'}
      };
    }
  };
};