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

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

goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.core.IUIBase');
goog.require('org.apache.royale.events.ValueEvent');
goog.require('org.apache.royale.html.beads.DisableBead');
goog.require('org.apache.royale.core.IBead');
goog.require('org.apache.royale.utils.Language');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9
 * @constructor
 * @implements {org.apache.royale.core.IBead}
 */
org.apache.royale.html.beads.DisabledAlphaBead = function() {
};


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


/**
 * @private
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.html.beads.DisabledAlphaBead.prototype.org_apache_royale_html_beads_DisabledAlphaBead__strand;


/**
 * @private
 * @type {number}
 */
org.apache.royale.html.beads.DisabledAlphaBead.prototype.org_apache_royale_html_beads_DisabledAlphaBead__enabledAlpha = 1.0;


/**
 * @private
 * @type {number}
 */
org.apache.royale.html.beads.DisabledAlphaBead.prototype.org_apache_royale_html_beads_DisabledAlphaBead__disabledAlpha = 0.5;


/**
 * @private
 * @param {org.apache.royale.events.ValueEvent} e
 */
org.apache.royale.html.beads.DisabledAlphaBead.prototype.org_apache_royale_html_beads_DisabledAlphaBead_disabledChangeHandler = function(e) {
  this.org_apache_royale_html_beads_DisabledAlphaBead_updateHost(e.value);
};


/**
 * @private
 * @param {Object} value
 */
org.apache.royale.html.beads.DisabledAlphaBead.prototype.org_apache_royale_html_beads_DisabledAlphaBead_updateHost = function(value) {
  if (!this.org_apache_royale_html_beads_DisabledAlphaBead__strand)
    return;
  var /** @type {boolean} */ disabled;
  if (value == null) {
    var /** @type {org.apache.royale.html.beads.DisableBead} */ disableBead = org.apache.royale.utils.Language.as(this.org_apache_royale_html_beads_DisabledAlphaBead__strand.getBeadByType(org.apache.royale.html.beads.DisableBead), org.apache.royale.html.beads.DisableBead);
    if (!disableBead)
      return;
    disabled = disableBead.disabled;
  } else {
    disabled = value;
  }
  this.org_apache_royale_html_beads_DisabledAlphaBead_host.alpha = disabled ? this.disabledAlpha : this.enabledAlpha;
};


org.apache.royale.html.beads.DisabledAlphaBead.prototype.get__enabledAlpha = function() {
  return this.org_apache_royale_html_beads_DisabledAlphaBead__enabledAlpha;
};


org.apache.royale.html.beads.DisabledAlphaBead.prototype.set__enabledAlpha = function(value) {
  this.org_apache_royale_html_beads_DisabledAlphaBead__enabledAlpha = value;
};


org.apache.royale.html.beads.DisabledAlphaBead.prototype.get__disabledAlpha = function() {
  return this.org_apache_royale_html_beads_DisabledAlphaBead__disabledAlpha;
};


org.apache.royale.html.beads.DisabledAlphaBead.prototype.set__disabledAlpha = function(value) {
  this.org_apache_royale_html_beads_DisabledAlphaBead__disabledAlpha = value;
};


org.apache.royale.html.beads.DisabledAlphaBead.prototype.set__strand = function(value) {
  this.org_apache_royale_html_beads_DisabledAlphaBead__strand = value;
  this.org_apache_royale_html_beads_DisabledAlphaBead_host.addEventListener("disabledChange", org.apache.royale.utils.Language.closure(this.org_apache_royale_html_beads_DisabledAlphaBead_disabledChangeHandler, this, 'disabledChangeHandler'));
  this.org_apache_royale_html_beads_DisabledAlphaBead_updateHost(null);
};


org.apache.royale.html.beads.DisabledAlphaBead.prototype.get__org_apache_royale_html_beads_DisabledAlphaBead_host = function() {
  return this.org_apache_royale_html_beads_DisabledAlphaBead__strand;
};


Object.defineProperties(org.apache.royale.html.beads.DisabledAlphaBead.prototype, /** @lends {org.apache.royale.html.beads.DisabledAlphaBead.prototype} */ {
/**
  * @export
  * @type {number} */
enabledAlpha: {
get: org.apache.royale.html.beads.DisabledAlphaBead.prototype.get__enabledAlpha,
set: org.apache.royale.html.beads.DisabledAlphaBead.prototype.set__enabledAlpha},
/**
  * @export
  * @type {number} */
disabledAlpha: {
get: org.apache.royale.html.beads.DisabledAlphaBead.prototype.get__disabledAlpha,
set: org.apache.royale.html.beads.DisabledAlphaBead.prototype.set__disabledAlpha},
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.DisabledAlphaBead.prototype.set__strand},
/**
  * @export
  * @type {org.apache.royale.core.IUIBase} */
org_apache_royale_html_beads_DisabledAlphaBead_host: {
get: org.apache.royale.html.beads.DisabledAlphaBead.prototype.get__org_apache_royale_html_beads_DisabledAlphaBead_host}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.DisabledAlphaBead.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'enabledAlpha': { type: 'Number', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.DisabledAlphaBead'},
        'disabledAlpha': { type: 'Number', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.DisabledAlphaBead'},
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'writeonly', declaredBy: 'org.apache.royale.html.beads.DisabledAlphaBead'}
      };
    },
    methods: function () {
      return {
        'DisabledAlphaBead': { type: '', declaredBy: 'org.apache.royale.html.beads.DisabledAlphaBead'}
      };
    }
  };
};