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

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

goog.require('org.apache.royale.core.IParentIUIBase');
goog.require('org.apache.royale.core.LayoutBase');
goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.core.IBeadLayout');



/**
 *  Constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @constructor
 * @extends {org.apache.royale.core.LayoutBase}
 * @implements {org.apache.royale.core.IBeadLayout}
 */
org.apache.royale.html.beads.layouts.VerticalLayout = function() {
  org.apache.royale.html.beads.layouts.VerticalLayout.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.beads.layouts.VerticalLayout, org.apache.royale.core.LayoutBase);


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


/**
 *  Layout children vertically
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 *  @royaleignorecoercion org.apache.royale.core.ILayoutHost
 *  @royaleignorecoercion org.apache.royale.core.IParentIUIBase
 *  @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @export
 * @override
 */
org.apache.royale.html.beads.layouts.VerticalLayout.prototype.layout = function() {
  
  var /** @type {Array} */ children;
  var /** @type {number} */ i = 0;
  var /** @type {number} */ n = 0;
  var /** @type {Object} */ contentView = this.layoutView;
  contentView.element.style["vertical-align"] = "top";
  children = contentView.internalChildren();
  n = children.length;
  for (i = 0; i < n; i++) {
    var /** @type {Object} */ child = children[i];
    if (child == null)
      continue;
    if (!child.royale_wrapper.displayStyleForLayout) {
      if (!child.royale_wrapper.visible) {
        child.royale_wrapper.setDisplayStyleForLayout('block');
      } else {
        child.style.display = 'inline-block';
        child.style.display = 'block';
      }
    }
    child.royale_wrapper.dispatchEvent('sizeChanged');
  }
  return true;
};


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.layouts.VerticalLayout.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {return {};},
    methods: function () {
      return {
        'VerticalLayout': { type: '', declaredBy: 'org.apache.royale.html.beads.layouts.VerticalLayout'},
        'layout': { type: 'Boolean', declaredBy: 'org.apache.royale.html.beads.layouts.VerticalLayout'}
      };
    }
  };
};