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

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

goog.require('org.apache.royale.core.IParent');
goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.core.IUIBase');
goog.require('org.apache.royale.events.IEventDispatcher');
goog.require('org.apache.royale.events.ValueEvent');
goog.require('org.apache.royale.core.IBead');
goog.require('org.apache.royale.utils.Language');



/**
 * @constructor
 * @implements {org.apache.royale.core.IBead}
 */
org.apache.royale.html.beads.VerticalAlignChildren = function() {
};


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


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


/**
 * @private
 * @type {string}
 */
org.apache.royale.html.beads.VerticalAlignChildren.prototype.org_apache_royale_html_beads_VerticalAlignChildren__alignment;


/**
 * @royaleignorecoercion org.apache.royale.core.IUIBase
 * @royaleignorecoercion org.apache.royale.core.IParent
 * @private
 * @param {org.apache.royale.events.ValueEvent} ev
 */
org.apache.royale.html.beads.VerticalAlignChildren.prototype.org_apache_royale_html_beads_VerticalAlignChildren_setAlignment = function(ev) {
  if (this.org_apache_royale_html_beads_VerticalAlignChildren__alignment) {
    if (ev && ev.value) {
      ev.value.element.style.verticalAlign = this.org_apache_royale_html_beads_VerticalAlignChildren__alignment;
    } else {
      var /** @type {Object} */ host = this.org_apache_royale_html_beads_VerticalAlignChildren__strand;
      var /** @type {number} */ len = host.numElements;
      for (var /** @type {number} */ i = 0; i < len; i++) {
        host.getElementAt(i).element.style.verticalAlign = this.org_apache_royale_html_beads_VerticalAlignChildren__alignment;
      }
    }
  }
};


org.apache.royale.html.beads.VerticalAlignChildren.prototype.set__strand = function(value) {
  this.org_apache_royale_html_beads_VerticalAlignChildren__strand = value;
  this.org_apache_royale_html_beads_VerticalAlignChildren__strand.addEventListener("childrenAdded", org.apache.royale.utils.Language.closure(this.org_apache_royale_html_beads_VerticalAlignChildren_setAlignment, this, 'setAlignment'));
};


org.apache.royale.html.beads.VerticalAlignChildren.prototype.get__alignment = function() {
  return this.org_apache_royale_html_beads_VerticalAlignChildren__alignment;
};


org.apache.royale.html.beads.VerticalAlignChildren.prototype.set__alignment = function(value) {
  this.org_apache_royale_html_beads_VerticalAlignChildren__alignment = value;
};


Object.defineProperties(org.apache.royale.html.beads.VerticalAlignChildren.prototype, /** @lends {org.apache.royale.html.beads.VerticalAlignChildren.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.VerticalAlignChildren.prototype.set__strand},
/**
  * @export
  * @type {string} */
alignment: {
get: org.apache.royale.html.beads.VerticalAlignChildren.prototype.get__alignment,
set: org.apache.royale.html.beads.VerticalAlignChildren.prototype.set__alignment}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.VerticalAlignChildren.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.VerticalAlignChildren'},
        'alignment': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.VerticalAlignChildren'}
      };
    },
    methods: function () {
      return {
        'VerticalAlignChildren': { type: '', declaredBy: 'org.apache.royale.html.beads.VerticalAlignChildren'}
      };
    }
  };
};