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

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

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


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


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


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


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


org.apache.royale.jewel.HGroup.prototype.set__gap = function(value) {
  this.typeNames = org.apache.royale.utils.StringUtil.removeWord(this.typeNames, " gap-" + this.layout.gap + "x" + org.apache.royale.jewel.beads.layouts.HorizontalLayout.GAP_STEP + "px");
  if (value != 0)
    this.typeNames += " gap-" + value + "x" + org.apache.royale.jewel.beads.layouts.HorizontalLayout.GAP_STEP + "px";
  if (this.parent)
    this.setClassName(this.computeFinalClassNames());
  this.layout.gap = value;
};


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


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



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