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

goog.provide('org.apache.royale.html.beads.models.DividedContainerModel');

goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.events.EventDispatcher');
goog.require('org.apache.royale.core.IBeadModel');



/**
 * Constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9
 * @constructor
 * @extends {org.apache.royale.events.EventDispatcher}
 * @implements {org.apache.royale.core.IBeadModel}
 */
org.apache.royale.html.beads.models.DividedContainerModel = function() {
  org.apache.royale.html.beads.models.DividedContainerModel.base(this, 'constructor');

this.org_apache_royale_html_beads_models_DividedContainerModel__pairAdjustments = [0];
};
goog.inherits(org.apache.royale.html.beads.models.DividedContainerModel, org.apache.royale.events.EventDispatcher);


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


/**
 * @private
 * @type {org.apache.royale.core.IStrand}
 */
org.apache.royale.html.beads.models.DividedContainerModel.prototype.org_apache_royale_html_beads_models_DividedContainerModel__strand;


/**
 * @private
 * @type {Array}
 */
org.apache.royale.html.beads.models.DividedContainerModel.prototype.org_apache_royale_html_beads_models_DividedContainerModel__pairAdjustments;


/**
 * Modifies a specific pairAdjustment indicated by an index and
 * by the amount given.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.9
 * @export
 * @param {number} amount
 * @param {number} index
 */
org.apache.royale.html.beads.models.DividedContainerModel.prototype.addPairAdjustment = function(amount, index) {
  this.org_apache_royale_html_beads_models_DividedContainerModel__pairAdjustments[index] += amount;
  this.dispatchEvent(new org.apache.royale.events.Event("pairAdjustmentChanged"));
};


org.apache.royale.html.beads.models.DividedContainerModel.prototype.set__strand = function(value) {
  this.org_apache_royale_html_beads_models_DividedContainerModel__strand = value;
};


org.apache.royale.html.beads.models.DividedContainerModel.prototype.get__pairAdjustments = function() {
  return this.org_apache_royale_html_beads_models_DividedContainerModel__pairAdjustments;
};


org.apache.royale.html.beads.models.DividedContainerModel.prototype.set__pairAdjustments = function(value) {
  this.org_apache_royale_html_beads_models_DividedContainerModel__pairAdjustments = value;
};


Object.defineProperties(org.apache.royale.html.beads.models.DividedContainerModel.prototype, /** @lends {org.apache.royale.html.beads.models.DividedContainerModel.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.models.DividedContainerModel.prototype.set__strand},
/**
  * @export
  * @type {Array} */
pairAdjustments: {
get: org.apache.royale.html.beads.models.DividedContainerModel.prototype.get__pairAdjustments,
set: org.apache.royale.html.beads.models.DividedContainerModel.prototype.set__pairAdjustments}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.models.DividedContainerModel.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'strand': { type: 'org.apache.royale.core.IStrand', access: 'writeonly', declaredBy: 'org.apache.royale.html.beads.models.DividedContainerModel'},
        'pairAdjustments': { type: 'Array', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.models.DividedContainerModel'}
      };
    },
    methods: function () {
      return {
        'DividedContainerModel': { type: '', declaredBy: 'org.apache.royale.html.beads.models.DividedContainerModel'},
        'addPairAdjustment': { type: 'void', declaredBy: 'org.apache.royale.html.beads.models.DividedContainerModel', parameters: function () { return [  { index: 1, type: 'Number', optional: false },{ index: 2, type: 'int', optional: false } ]; }}
      };
    }
  };
};