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

goog.provide('org.apache.royale.html.SimpleList');

goog.require('goog.events');
goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.html.List');
goog.require('org.apache.royale.html.util.addElementToWrapper');
goog.require('org.apache.royale.utils.Language');



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


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


/**
 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @royaleignorecoercion HTMLSelectElement
 * @protected
 * @override
 */
org.apache.royale.html.SimpleList.prototype.createElement = function() {
  org.apache.royale.html.util.addElementToWrapper(this, 'select');
  this.element.size = 5;
  goog.events.listen(this.element, 'change', org.apache.royale.utils.Language.closure(this.changeHandler, this, 'changeHandler'));
  this.typeNames = 'SimpleList';
  return this.element;
};


/**
 * @royaleignorecoercion HTMLSelectElement
 * @protected
 * @param {Event} event
 */
org.apache.royale.html.SimpleList.prototype.changeHandler = function(event) {
  this.model.selectedIndex = this.element.selectedIndex;
};


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



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