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

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

goog.require('org.apache.royale.core.IParentIUIBase');
goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.core.IUIBase');
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.9
 * @constructor
 * @extends {org.apache.royale.core.LayoutBase}
 * @implements {org.apache.royale.core.IBeadLayout}
 */
org.apache.royale.html.beads.layouts.HorizontalLayout = function() {
  org.apache.royale.html.beads.layouts.HorizontalLayout.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.beads.layouts.HorizontalLayout, org.apache.royale.core.LayoutBase);


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


/**
 * @copy org.apache.royale.core.IBeadLayout#layout
 * @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.HorizontalLayout.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["white-space"] = "nowrap";
  children = contentView.internalChildren();
  n = children.length;
  for (i = 0; i < n; i++) {
    var /** @type {Object} */ child = children[i];
    if (child == null)
      continue;
    child.royale_wrapper.setDisplayStyleForLayout('inline-block');
    if (child.style.display !== 'none') {
      child.style.display = 'inline-block';
    }
  }
  return true;
};


org.apache.royale.html.beads.layouts.HorizontalLayout.prototype.set__strand = function(value) {
  org.apache.royale.html.beads.layouts.HorizontalLayout.superClass_.set__strand.apply(this, [ value] );
  var /** @type {org.apache.royale.core.IUIBase} */ base = value;
  if (base.element.style.display !== "none") {
    base.element.style.display = "block";
  }
};


Object.defineProperties(org.apache.royale.html.beads.layouts.HorizontalLayout.prototype, /** @lends {org.apache.royale.html.beads.layouts.HorizontalLayout.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.layouts.HorizontalLayout.prototype.set__strand}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.layouts.HorizontalLayout.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.layouts.HorizontalLayout'}
      };
    },
    methods: function () {
      return {
        'HorizontalLayout': { type: '', declaredBy: 'org.apache.royale.html.beads.layouts.HorizontalLayout'},
        'layout': { type: 'Boolean', declaredBy: 'org.apache.royale.html.beads.layouts.HorizontalLayout'}
      };
    }
  };
};