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

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

goog.require('org.apache.royale.jewel.Group');
goog.require('org.apache.royale.jewel.beads.layouts.GridLayout');
goog.require('org.apache.royale.utils.StringUtil');
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.Group}
 */
org.apache.royale.jewel.Grid = function() {
  org.apache.royale.jewel.Grid.base(this, 'constructor');
  this.typeNames = "jewel " + org.apache.royale.jewel.beads.layouts.GridLayout.LAYOUT_TYPE_NAMES;
  this.layout = new org.apache.royale.jewel.beads.layouts.GridLayout();
  this.addBead(this.layout);
};
goog.inherits(org.apache.royale.jewel.Grid, org.apache.royale.jewel.Group);


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


org.apache.royale.jewel.Grid.prototype.get__layout = function() {
  return org.apache.royale.utils.Language.as(this._layout, org.apache.royale.jewel.beads.layouts.GridLayout);
};


org.apache.royale.jewel.Grid.prototype.set__layout = function(value) {
  this._layout = value;
};


org.apache.royale.jewel.Grid.prototype.get__gap = function() {
  return this.layout.gap;
};


org.apache.royale.jewel.Grid.prototype.set__gap = function(value) {
  this.typeNames = org.apache.royale.utils.StringUtil.removeWord(this.typeNames, " gap");
  this.typeNames += " gap";
  if (this.parent)
    this.setClassName(this.computeFinalClassNames());
  this.layout.gap = value;
};


Object.defineProperties(org.apache.royale.jewel.Grid.prototype, /** @lends {org.apache.royale.jewel.Grid.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.jewel.beads.layouts.GridLayout} */
layout: {
get: org.apache.royale.jewel.Grid.prototype.get__layout,
set: org.apache.royale.jewel.Grid.prototype.set__layout},
/**
  * @export
  * @type {boolean} */
gap: {
get: org.apache.royale.jewel.Grid.prototype.get__gap,
set: org.apache.royale.jewel.Grid.prototype.set__gap}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.Grid.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'layout': { type: 'org.apache.royale.jewel.beads.layouts.GridLayout', access: 'readwrite', declaredBy: 'org.apache.royale.jewel.Grid'},
        'gap': { type: 'Boolean', access: 'readwrite', declaredBy: 'org.apache.royale.jewel.Grid'}
      };
    },
    methods: function () {
      return {
        'Grid': { type: '', declaredBy: 'org.apache.royale.jewel.Grid'}
      };
    }
  };
};