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

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

goog.require('org.apache.royale.events.ValueChangeEvent');
goog.require('org.apache.royale.html.beads.models.RangeModel');



/**
 *  constructor.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @constructor
 * @extends {org.apache.royale.html.beads.models.RangeModel}
 */
org.apache.royale.html.beads.models.RangeModelExtended = function() {
  org.apache.royale.html.beads.models.RangeModelExtended.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.beads.models.RangeModelExtended, org.apache.royale.html.beads.models.RangeModel);


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


/**
 * @private
 * @type {number}
 */
org.apache.royale.html.beads.models.RangeModelExtended.prototype.org_apache_royale_html_beads_models_RangeModelExtended__value = 0;


/**
 * @private
 * @type {Function}
 */
org.apache.royale.html.beads.models.RangeModelExtended.prototype.org_apache_royale_html_beads_models_RangeModelExtended__labelFunction;


/**
 *  Returns the label, using the labelFunction (if provided) for the value
 *  at the given index.
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @export
 * @param {number} index
 * @return {string}
 */
org.apache.royale.html.beads.models.RangeModelExtended.prototype.getLabelForIndex = function(index) {
  if (this.org_apache_royale_html_beads_models_RangeModelExtended__labelFunction != null) {
    return this.org_apache_royale_html_beads_models_RangeModelExtended__labelFunction(this, index);
  } else {
    return "";
  }
};


org.apache.royale.html.beads.models.RangeModelExtended.prototype.get__value = function() {
  return this.org_apache_royale_html_beads_models_RangeModelExtended__value;
};


org.apache.royale.html.beads.models.RangeModelExtended.prototype.set__value = function(newValue) {
  if (this.org_apache_royale_html_beads_models_RangeModelExtended__value != newValue) {
    var /** @type {org.apache.royale.events.ValueChangeEvent} */ vce = org.apache.royale.events.ValueChangeEvent.createUpdateEvent(this._strand, "value", this.org_apache_royale_html_beads_models_RangeModelExtended__value, newValue);
    this.org_apache_royale_html_beads_models_RangeModelExtended__value = newValue;
    this.dispatchEvent(vce);
  }
};


org.apache.royale.html.beads.models.RangeModelExtended.prototype.get__labelFunction = function() {
  return this.org_apache_royale_html_beads_models_RangeModelExtended__labelFunction;
};


org.apache.royale.html.beads.models.RangeModelExtended.prototype.set__labelFunction = function(value) {
  this.org_apache_royale_html_beads_models_RangeModelExtended__labelFunction = value;
};


Object.defineProperties(org.apache.royale.html.beads.models.RangeModelExtended.prototype, /** @lends {org.apache.royale.html.beads.models.RangeModelExtended.prototype} */ {
/**
  * @export
  * @type {number} */
value: {
get: org.apache.royale.html.beads.models.RangeModelExtended.prototype.get__value,
set: org.apache.royale.html.beads.models.RangeModelExtended.prototype.set__value},
/**
  * @export
  * @type {Function} */
labelFunction: {
get: org.apache.royale.html.beads.models.RangeModelExtended.prototype.get__labelFunction,
set: org.apache.royale.html.beads.models.RangeModelExtended.prototype.set__labelFunction}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.models.RangeModelExtended.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'value': { type: 'Number', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.models.RangeModelExtended'},
        'labelFunction': { type: 'Function', access: 'readwrite', declaredBy: 'org.apache.royale.html.beads.models.RangeModelExtended'}
      };
    },
    methods: function () {
      return {
        'RangeModelExtended': { type: '', declaredBy: 'org.apache.royale.html.beads.models.RangeModelExtended'},
        'getLabelForIndex': { type: 'String', declaredBy: 'org.apache.royale.html.beads.models.RangeModelExtended', parameters: function () { return [  { index: 1, type: 'Number', optional: false } ]; }}
      };
    }
  };
};