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

goog.provide('org.apache.royale.jewel.TabBarContent');

goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.html.util.addElementToWrapper');
goog.require('org.apache.royale.jewel.Container');
goog.require('org.apache.royale.jewel.supportClasses.IActivable');
goog.require('org.apache.royale.utils.Language');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @constructor
 * @extends {org.apache.royale.jewel.Container}
 */
org.apache.royale.jewel.TabBarContent = function() {
  org.apache.royale.jewel.TabBarContent.base(this, 'constructor');
  this.typeNames = "jewel tabbarcontent";
};
goog.inherits(org.apache.royale.jewel.TabBarContent, org.apache.royale.jewel.Container);


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


/**
 *  shows a concrete content and hides the rest
 * 
 *  @asparam id, the id of the container to show
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @export
 * @param {string} id
 */
org.apache.royale.jewel.TabBarContent.prototype.showContent = function(id) {
  try {
    for (var /** @type {number} */ i = 0; i < this.numElements; i++) {
      var /** @type {org.apache.royale.jewel.supportClasses.IActivable} */ content = org.apache.royale.utils.Language.as(this.getElementAt(i), org.apache.royale.jewel.supportClasses.IActivable);
      if (content.id == id) {
        content.isActive = true;
      } else {
        content.isActive = false;
      }
    }
  } catch (error) {
    throw new Error("One or more content in TabBarContent is not implementing IActivable interface.");
  }
};


/**
 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @protected
 * @override
 */
org.apache.royale.jewel.TabBarContent.prototype.createElement = function() {
  return org.apache.royale.html.util.addElementToWrapper(this, 'div');
};


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.TabBarContent.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {return {};},
    methods: function () {
      return {
        'TabBarContent': { type: '', declaredBy: 'org.apache.royale.jewel.TabBarContent'},
        'showContent': { type: 'void', declaredBy: 'org.apache.royale.jewel.TabBarContent', parameters: function () { return [  { index: 1, type: 'String', optional: false } ]; }}
      };
    }
  };
};