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

goog.provide('org.apache.royale.jewel.beads.views.SpinnerView');

goog.require('org.apache.royale.core.BeadViewBase');
goog.require('org.apache.royale.core.IRangeModel');
goog.require('org.apache.royale.core.IStrand');
goog.require('org.apache.royale.core.UIBase');
goog.require('org.apache.royale.events.Event');
goog.require('org.apache.royale.events.IEventDispatcher');
goog.require('org.apache.royale.jewel.Button');
goog.require('org.apache.royale.jewel.beads.controllers.SpinnerMouseController');
goog.require('org.apache.royale.core.IBeadView');
goog.require('org.apache.royale.jewel.beads.controls.spinner.ISpinnerView');
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.core.BeadViewBase}
 * @implements {org.apache.royale.jewel.beads.controls.spinner.ISpinnerView}
 * @implements {org.apache.royale.core.IBeadView}
 */
org.apache.royale.jewel.beads.views.SpinnerView = function() {
  org.apache.royale.jewel.beads.views.SpinnerView.base(this, 'constructor');
};
goog.inherits(org.apache.royale.jewel.beads.views.SpinnerView, org.apache.royale.core.BeadViewBase);


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


/**
 * @private
 * @type {org.apache.royale.core.IRangeModel}
 */
org.apache.royale.jewel.beads.views.SpinnerView.prototype.org_apache_royale_jewel_beads_views_SpinnerView_rangeModel;


/**
 * @asprivate
 * @royaleignorecoercion org.apache.royale.core.UIBase
 * @private
 * @param {org.apache.royale.events.Event} event
 */
org.apache.royale.jewel.beads.views.SpinnerView.prototype.org_apache_royale_jewel_beads_views_SpinnerView_sizeChangeHandler = function(event) {
  var /** @type {number} */ w = this._strand.width;
  var /** @type {number} */ h = this._strand.height / 2;
  
  
};


org.apache.royale.jewel.beads.views.SpinnerView.prototype.set__strand = function(value) {
  org.apache.royale.jewel.beads.views.SpinnerView.superClass_.set__strand.apply(this, [ value] );
  
  value.addEventListener("widthChanged", org.apache.royale.utils.Language.closure(this.org_apache_royale_jewel_beads_views_SpinnerView_sizeChangeHandler, this, 'sizeChangeHandler'));
  value.addEventListener("heightChanged", org.apache.royale.utils.Language.closure(this.org_apache_royale_jewel_beads_views_SpinnerView_sizeChangeHandler, this, 'sizeChangeHandler'));
  var /** @type {Object} */ host = value;
  this._increment = new org.apache.royale.jewel.Button();
  this._increment.addClass("up");
  this._increment.text = '▲';
  host.addElement(this._increment);
  this._decrement = new org.apache.royale.jewel.Button();
  this._decrement.addClass("down");
  this._decrement.text = '▼';
  host.addElement(this._decrement);
  
  this.org_apache_royale_jewel_beads_views_SpinnerView_sizeChangeHandler(null);
};


org.apache.royale.jewel.beads.views.SpinnerView.prototype.get__decrement = function() {
  return this._decrement;
};


org.apache.royale.jewel.beads.views.SpinnerView.prototype.get__increment = function() {
  return this._increment;
};


Object.defineProperties(org.apache.royale.jewel.beads.views.SpinnerView.prototype, /** @lends {org.apache.royale.jewel.beads.views.SpinnerView.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.jewel.beads.views.SpinnerView.prototype.set__strand},
/**
  * @export
  * @type {org.apache.royale.jewel.Button} */
decrement: {
get: org.apache.royale.jewel.beads.views.SpinnerView.prototype.get__decrement},
/**
  * @export
  * @type {org.apache.royale.jewel.Button} */
increment: {
get: org.apache.royale.jewel.beads.views.SpinnerView.prototype.get__increment}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.jewel.beads.views.SpinnerView.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'SpinnerView', qName: 'org.apache.royale.jewel.beads.views.SpinnerView', kind: 'class' }], interfaces: [org.apache.royale.jewel.beads.controls.spinner.ISpinnerView, org.apache.royale.core.IBeadView] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.jewel.beads.views.SpinnerView.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.jewel.beads.views.SpinnerView'},
        'decrement': { type: 'org.apache.royale.jewel.Button', access: 'readonly', declaredBy: 'org.apache.royale.jewel.beads.views.SpinnerView'},
        'increment': { type: 'org.apache.royale.jewel.Button', access: 'readonly', declaredBy: 'org.apache.royale.jewel.beads.views.SpinnerView'}
      };
    },
    methods: function () {
      return {
        'SpinnerView': { type: '', declaredBy: 'org.apache.royale.jewel.beads.views.SpinnerView'}
      };
    }
  };
};