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

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

goog.require('org.apache.royale.core.GroupBase');
goog.require('org.apache.royale.core.IBead');
goog.require('org.apache.royale.core.IChangePropagator');
goog.require('org.apache.royale.core.IDataGridModel');
goog.require('org.apache.royale.core.IDataGridPresentationModel');
goog.require('org.apache.royale.core.ValuesManager');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.utils.loadBeadFromValuesManager');
goog.require('org.apache.royale.core.IDataGrid');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @constructor
 * @extends {org.apache.royale.core.GroupBase}
 * @implements {org.apache.royale.core.IDataGrid}
 */
org.apache.royale.html.DataGrid = function() {
  org.apache.royale.html.DataGrid.base(this, 'constructor');
  this.typeNames = "DataGrid";
  this.width = 200;
  this.height = 200;
};
goog.inherits(org.apache.royale.html.DataGrid, org.apache.royale.core.GroupBase);


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


/**
 * @private
 * @type {org.apache.royale.core.IDataGridPresentationModel}
 */
org.apache.royale.html.DataGrid.prototype.org_apache_royale_html_DataGrid__presentationModel;


/**
 * @export
 * @override
 */
org.apache.royale.html.DataGrid.prototype.addedToParent = function() {
  org.apache.royale.utils.loadBeadFromValuesManager(org.apache.royale.core.IChangePropagator, "iChangePropagator", this);
  org.apache.royale.html.DataGrid.superClass_.addedToParent.apply(this);
  this.dispatchEvent(new org.apache.royale.events.Event("initComplete"));
};


org.apache.royale.html.DataGrid.prototype.get__columns = function() {
  return this.model.columns;
};


org.apache.royale.html.DataGrid.prototype.set__columns = function(value) {
  this.model.columns = value;
};


org.apache.royale.html.DataGrid.prototype.get__dataProvider = function() {
  return this.model.dataProvider;
};


org.apache.royale.html.DataGrid.prototype.set__dataProvider = function(value) {
  this.model.dataProvider = value;
};


org.apache.royale.html.DataGrid.prototype.get__selectedIndex = function() {
  return this.model.selectedIndex;
};


org.apache.royale.html.DataGrid.prototype.set__selectedIndex = function(value) {
  this.model.selectedIndex = value;
};


org.apache.royale.html.DataGrid.prototype.get__presentationModel = function() {
  if (this.org_apache_royale_html_DataGrid__presentationModel == null) {
    var /** @type {Object} */ c = org.apache.royale.core.ValuesManager["valuesImpl"].getValue(this, "iDataGridPresentationModel");
    if (c) {
      this.org_apache_royale_html_DataGrid__presentationModel = new c();
      this.addBead(this.org_apache_royale_html_DataGrid__presentationModel);
    }
  }
  return this.org_apache_royale_html_DataGrid__presentationModel;
};


org.apache.royale.html.DataGrid.prototype.set__presentationModel = function(value) {
  this.org_apache_royale_html_DataGrid__presentationModel = value;
};


org.apache.royale.html.DataGrid.prototype.get__rowHeight = function() {
  return this.presentationModel.rowHeight;
};


org.apache.royale.html.DataGrid.prototype.set__rowHeight = function(value) {
  this.presentationModel.rowHeight = value;
};


Object.defineProperties(org.apache.royale.html.DataGrid.prototype, /** @lends {org.apache.royale.html.DataGrid.prototype} */ {
/**
  * @export
  * @type {Array} */
columns: {
get: org.apache.royale.html.DataGrid.prototype.get__columns,
set: org.apache.royale.html.DataGrid.prototype.set__columns},
/**
  * @export
  * @type {Object} */
dataProvider: {
get: org.apache.royale.html.DataGrid.prototype.get__dataProvider,
set: org.apache.royale.html.DataGrid.prototype.set__dataProvider},
/**
  * @export
  * @type {number} */
selectedIndex: {
get: org.apache.royale.html.DataGrid.prototype.get__selectedIndex,
set: org.apache.royale.html.DataGrid.prototype.set__selectedIndex},
/**
  * @export
  * @type {org.apache.royale.core.IBead} */
presentationModel: {
get: org.apache.royale.html.DataGrid.prototype.get__presentationModel,
set: org.apache.royale.html.DataGrid.prototype.set__presentationModel},
/**
  * @export
  * @type {number} */
rowHeight: {
get: org.apache.royale.html.DataGrid.prototype.get__rowHeight,
set: org.apache.royale.html.DataGrid.prototype.set__rowHeight}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.DataGrid.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'columns': { type: 'Array', access: 'readwrite', declaredBy: 'org.apache.royale.html.DataGrid'},
        'dataProvider': { type: 'Object', access: 'readwrite', declaredBy: 'org.apache.royale.html.DataGrid'},
        'selectedIndex': { type: 'int', access: 'readwrite', declaredBy: 'org.apache.royale.html.DataGrid', metadata: function () { return [ { name: 'Bindable', args: [ { key: '', value: 'change' } ] } ]; }},
        'presentationModel': { type: 'org.apache.royale.core.IBead', access: 'readwrite', declaredBy: 'org.apache.royale.html.DataGrid'},
        'rowHeight': { type: 'Number', access: 'readwrite', declaredBy: 'org.apache.royale.html.DataGrid'}
      };
    },
    methods: function () {
      return {
        'DataGrid': { type: '', declaredBy: 'org.apache.royale.html.DataGrid'},
        'addedToParent': { type: 'void', declaredBy: 'org.apache.royale.html.DataGrid'}
      };
    },
    metadata: function () { return [  ]; }
  };
};