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

goog.provide('org.apache.royale.jewel.beads.layouts.GridLayout');

goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.jewel.beads.layouts.StyledLayoutBase');



/**
 *  Constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @constructor
 * @extends {org.apache.royale.jewel.beads.layouts.StyledLayoutBase}
 */
org.apache.royale.jewel.beads.layouts.GridLayout = function() {
  org.apache.royale.jewel.beads.layouts.GridLayout.base(this, 'constructor');
};
goog.inherits(org.apache.royale.jewel.beads.layouts.GridLayout, org.apache.royale.jewel.beads.layouts.StyledLayoutBase);


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


/**
 * @export
 * @const
 * @type {string}
 */
org.apache.royale.jewel.beads.layouts.GridLayout.LAYOUT_TYPE_NAMES = "layout grid";


/**
 *  Add class selectors when the component is addedToParent
 *  Otherwise component will not get the class selectors when 
 *  perform "removeElement" and then "addElement"
 * 
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9.4
 * @export
 * @override
 */
org.apache.royale.jewel.beads.layouts.GridLayout.prototype.beadsAddedHandler = function(event) {
  event = typeof event !== 'undefined' ? event : null;
  org.apache.royale.jewel.beads.layouts.GridLayout.superClass_.beadsAddedHandler.apply(this);
  if (this.hostClassList.contains("layout"))
    this.hostClassList.remove("layout");
  this.hostClassList.add("layout");
  if (this.hostClassList.contains("grid"))
    this.hostClassList.remove("grid");
  this.hostClassList.add("grid");
  this.org_apache_royale_jewel_beads_layouts_GridLayout_setGap(this.org_apache_royale_jewel_beads_layouts_GridLayout__gap);
};


/**
 * @private
 * @type {boolean}
 */
org.apache.royale.jewel.beads.layouts.GridLayout.prototype.org_apache_royale_jewel_beads_layouts_GridLayout__gap;


/**
 * @private
 * @param {boolean} value
 */
org.apache.royale.jewel.beads.layouts.GridLayout.prototype.org_apache_royale_jewel_beads_layouts_GridLayout_setGap = function(value) {
  value ? this.hostClassList.add("gap") : this.hostClassList.remove("gap");
};


/**
 * @copy org.apache.royale.core.IBeadLayout#layout
 * @royaleignorecoercion org.apache.royale.core.UIBase
 * @export
 * @override
 */
org.apache.royale.jewel.beads.layouts.GridLayout.prototype.layout = function() {
  
  return true;
};


org.apache.royale.jewel.beads.layouts.GridLayout.prototype.get__gap = function() {
  return this.org_apache_royale_jewel_beads_layouts_GridLayout__gap;
};


org.apache.royale.jewel.beads.layouts.GridLayout.prototype.set__gap = function(value) {
  if (this.org_apache_royale_jewel_beads_layouts_GridLayout__gap != value) {
    if (this.hostComponent)
      this.org_apache_royale_jewel_beads_layouts_GridLayout_setGap(value);
    this.org_apache_royale_jewel_beads_layouts_GridLayout__gap = value;
  }
};


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


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.beads.layouts.GridLayout.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'gap': { type: 'Boolean', access: 'readwrite', declaredBy: 'org.apache.royale.jewel.beads.layouts.GridLayout'}
      };
    },
    methods: function () {
      return {
        'GridLayout': { type: '', declaredBy: 'org.apache.royale.jewel.beads.layouts.GridLayout'},
        'beadsAddedHandler': { type: 'void', declaredBy: 'org.apache.royale.jewel.beads.layouts.GridLayout', parameters: function () { return [  { index: 1, type: 'org.apache.royale.events.Event', optional: true } ]; }},
        'layout': { type: 'Boolean', declaredBy: 'org.apache.royale.jewel.beads.layouts.GridLayout'}
      };
    }
  };
};