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

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

goog.require('org.apache.royale.core.BeadViewBase');
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.graphics.SolidColor');
goog.require('org.apache.royale.graphics.SolidColorStroke');
goog.require('org.apache.royale.svg.Path');
goog.require('org.apache.royale.svg.Rect');
goog.require('org.apache.royale.core.IBeadView');
goog.require('org.apache.royale.utils.Language');



/**
 * @constructor
 * @extends {org.apache.royale.core.BeadViewBase}
 * @implements {org.apache.royale.core.IBeadView}
 */
org.apache.royale.html.beads.IncrementButtonView = function() {
  org.apache.royale.html.beads.IncrementButtonView.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.beads.IncrementButtonView, org.apache.royale.core.BeadViewBase);


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


/**
 * @private
 * @type {org.apache.royale.svg.Rect}
 */
org.apache.royale.html.beads.IncrementButtonView.prototype.org_apache_royale_html_beads_IncrementButtonView__backRect;


/**
 * @private
 * @type {org.apache.royale.svg.Path}
 */
org.apache.royale.html.beads.IncrementButtonView.prototype.org_apache_royale_html_beads_IncrementButtonView__arrow;


/**
 * @private
 * @param {org.apache.royale.events.Event} event
 */
org.apache.royale.html.beads.IncrementButtonView.prototype.org_apache_royale_html_beads_IncrementButtonView_sizeHandler = function(event) {
  var /** @type {org.apache.royale.core.UIBase} */ host = org.apache.royale.utils.Language.as(this._strand, org.apache.royale.core.UIBase);
  this.org_apache_royale_html_beads_IncrementButtonView__backRect.x = 0;
  this.org_apache_royale_html_beads_IncrementButtonView__backRect.y = 0;
  this.org_apache_royale_html_beads_IncrementButtonView__backRect.setWidthAndHeight(host.width, host.height, true);
  this.org_apache_royale_html_beads_IncrementButtonView__backRect.drawRect(0, 0, host.width, host.height);
  var /** @type {number} */ xm = host.width / 2;
  var /** @type {number} */ ym = host.height - 4;
  this.org_apache_royale_html_beads_IncrementButtonView__arrow.setWidthAndHeight(xm, ym, true);
  this.org_apache_royale_html_beads_IncrementButtonView__arrow.y = 2;
  this.org_apache_royale_html_beads_IncrementButtonView__arrow.x = 0;
  this.org_apache_royale_html_beads_IncrementButtonView__arrow.drawStringPath(0, 0, "M " + xm + " 2 L " + (xm - 8) + " " + ym + " L " + (xm + 8) + " " + ym + " Z");
};


org.apache.royale.html.beads.IncrementButtonView.prototype.set__strand = function(value) {
  org.apache.royale.html.beads.IncrementButtonView.superClass_.set__strand.apply(this, [ value] );
  this._strand = value;
  var /** @type {org.apache.royale.core.UIBase} */ host = org.apache.royale.utils.Language.as(this._strand, org.apache.royale.core.UIBase);
  this.org_apache_royale_html_beads_IncrementButtonView__backRect = new org.apache.royale.svg.Rect();
  this.org_apache_royale_html_beads_IncrementButtonView__backRect.fill = new org.apache.royale.graphics.SolidColor();
  org.apache.royale.utils.Language.as(this.org_apache_royale_html_beads_IncrementButtonView__backRect.fill, org.apache.royale.graphics.SolidColor).color = 0xFFFFFF;
  this.org_apache_royale_html_beads_IncrementButtonView__backRect.stroke = new org.apache.royale.graphics.SolidColorStroke();
  org.apache.royale.utils.Language.as(this.org_apache_royale_html_beads_IncrementButtonView__backRect.stroke, org.apache.royale.graphics.SolidColorStroke).color = 0x000000;
  org.apache.royale.utils.Language.as(this.org_apache_royale_html_beads_IncrementButtonView__backRect.stroke, org.apache.royale.graphics.SolidColorStroke).weight = 1.0;
  host.addElement(this.org_apache_royale_html_beads_IncrementButtonView__backRect);
  this.org_apache_royale_html_beads_IncrementButtonView__arrow = new org.apache.royale.svg.Path();
  this.org_apache_royale_html_beads_IncrementButtonView__arrow.fill = new org.apache.royale.graphics.SolidColor();
  org.apache.royale.utils.Language.as(this.org_apache_royale_html_beads_IncrementButtonView__arrow.fill, org.apache.royale.graphics.SolidColor).color = 0x000000;
  host.addElement(this.org_apache_royale_html_beads_IncrementButtonView__arrow);
  host.addEventListener("widthChanged", org.apache.royale.utils.Language.closure(this.org_apache_royale_html_beads_IncrementButtonView_sizeHandler, this, 'sizeHandler'));
  host.addEventListener("heightChanged", org.apache.royale.utils.Language.closure(this.org_apache_royale_html_beads_IncrementButtonView_sizeHandler, this, 'sizeHandler'));
  this.org_apache_royale_html_beads_IncrementButtonView_sizeHandler(null);
};


Object.defineProperties(org.apache.royale.html.beads.IncrementButtonView.prototype, /** @lends {org.apache.royale.html.beads.IncrementButtonView.prototype} */ {
/**
  * @export
  * @type {org.apache.royale.core.IStrand} */
strand: {
set: org.apache.royale.html.beads.IncrementButtonView.prototype.set__strand}}
);


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



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.beads.IncrementButtonView.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.IncrementButtonView'}
      };
    },
    methods: function () {
      return {
        'IncrementButtonView': { type: '', declaredBy: 'org.apache.royale.html.beads.IncrementButtonView'}
      };
    }
  };
};