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

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

goog.require('org.apache.royale.core.IDocument');
goog.require('org.apache.royale.core.ISelectionModel');
goog.require('org.apache.royale.core.UIBase');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.html.beads.ListView');
goog.require('org.apache.royale.html.beads.layouts.IOneFlexibleChildLayout');
goog.require('org.apache.royale.utils.loadBeadFromValuesManager');
goog.require('org.apache.royale.utils.Language');



/**
 * Constructor.
 *  
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.8
 * @constructor
 * @extends {org.apache.royale.html.beads.ListView}
 */
org.apache.royale.html.beads.AccordionView = function() {
  org.apache.royale.html.beads.AccordionView.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.beads.AccordionView, org.apache.royale.html.beads.ListView);


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


/**
 * @private
 * @type {org.apache.royale.html.beads.layouts.IOneFlexibleChildLayout}
 */
org.apache.royale.html.beads.AccordionView.prototype.org_apache_royale_html_beads_AccordionView__layout;


/**
 * @asprivate
 * @protected
 * @override
 */
org.apache.royale.html.beads.AccordionView.prototype.selectionChangeHandler = function(event) {
  org.apache.royale.html.beads.AccordionView.superClass_.selectionChangeHandler.apply(this, [ event] );
  var /** @type {org.apache.royale.core.ISelectionModel} */ model = org.apache.royale.utils.Language.as(org.apache.royale.utils.loadBeadFromValuesManager(org.apache.royale.core.ISelectionModel, "iBeadModel", this.host), org.apache.royale.core.ISelectionModel);
  this.layout.flexibleChild = String(model.selectedIndex);
};


org.apache.royale.html.beads.AccordionView.prototype.get__org_apache_royale_html_beads_AccordionView_elements = function() {
  var /** @type {org.apache.royale.core.UIBase} */ host = org.apache.royale.utils.Language.as(this._strand, org.apache.royale.core.UIBase);
  var /** @type {Array} */ e = [];
  for (var /** @type {number} */ i = 0; i < host.numElements; i++) {
    e.push(host.getElementAt(i));
  }
  return e;
};


org.apache.royale.html.beads.AccordionView.prototype.get__layout = function() {
  if (!this.org_apache_royale_html_beads_AccordionView__layout) {
    this.org_apache_royale_html_beads_AccordionView__layout = org.apache.royale.utils.Language.as(org.apache.royale.utils.loadBeadFromValuesManager(org.apache.royale.html.beads.layouts.IOneFlexibleChildLayout, "iBeadLayout", this._strand), org.apache.royale.html.beads.layouts.IOneFlexibleChildLayout);
    if (this.org_apache_royale_html_beads_AccordionView__layout)
      org.apache.royale.utils.Language.as(this.org_apache_royale_html_beads_AccordionView__layout, org.apache.royale.core.IDocument, true).setDocument(this.org_apache_royale_html_beads_AccordionView_elements);
  }
  return this.org_apache_royale_html_beads_AccordionView__layout;
};


Object.defineProperties(org.apache.royale.html.beads.AccordionView.prototype, /** @lends {org.apache.royale.html.beads.AccordionView.prototype} */ {
/**
  * @export
  * @type {Array} */
org_apache_royale_html_beads_AccordionView_elements: {
get: org.apache.royale.html.beads.AccordionView.prototype.get__org_apache_royale_html_beads_AccordionView_elements},
/**
  * @export
  * @type {org.apache.royale.html.beads.layouts.IOneFlexibleChildLayout} */
layout: {
get: org.apache.royale.html.beads.AccordionView.prototype.get__layout}}
);


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



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